diff options
| author | Kamen Mladenov <kamen@syndamia.com> | 2024-01-08 18:12:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-08 18:12:50 +0200 |
| commit | 3a77d04a608d621232915e81bfa82b7565f61a35 (patch) | |
| tree | 1628c47d5e948008c40dce1518140025cd7416bc /.github/workflows/dev-branch.yml | |
| parent | f891b7daabf33d50913edb11dbbfb82a9216327b (diff) | |
| parent | fe29a3630d48d3e1d44287ea41682621d3a3dab0 (diff) | |
| download | pico-web-3a77d04a608d621232915e81bfa82b7565f61a35.tar pico-web-3a77d04a608d621232915e81bfa82b7565f61a35.tar.gz pico-web-3a77d04a608d621232915e81bfa82b7565f61a35.zip | |
Merge pull request #1 from Syndamia/dev-workflow
Updated workflows and fixed issues
Diffstat (limited to '.github/workflows/dev-branch.yml')
| -rw-r--r-- | .github/workflows/dev-branch.yml | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/.github/workflows/dev-branch.yml b/.github/workflows/dev-branch.yml new file mode 100644 index 0000000..6d66da2 --- /dev/null +++ b/.github/workflows/dev-branch.yml @@ -0,0 +1,87 @@ +name: Tests, analysis and push to dev dockerhub +on: + push: + branches: + - dev +jobs: + # This is done to prevent potential race conditions; + # multiple jobs start with the source code, but since + # they have no "needs", one could start a little bit later, + # and in meantime a commit could be pushed + Clone-repo: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - uses: actions/upload-artifact@v3 + with: + name: source-code + path: . + + Tests: + runs-on: ubuntu-latest + needs: Clone-repo + steps: + - uses: actions/download-artifact@v3 + with: + name: source-code + path: . + - name: Run tests + run: make tests + + Static-analysis: + runs-on: ubuntu-latest + needs: Clone-repo + steps: + - uses: actions/download-artifact@v3 + with: + name: source-code + path: . + - name: Run satic analysis + run: make static-analysis + + Security-analysis: + runs-on: ubuntu-latest + needs: Clone-repo + steps: + - uses: actions/download-artifact@v3 + with: + name: source-code + path: . + - name: Run security analysis + run: make security-analysis + + Build: + runs-on: ubuntu-latest + needs: [ Tests, Static-analysis, Security-analysis ] + steps: + - uses: actions/download-artifact@v3 + with: + name: source-code + path: . + - name: Build server and browser + run: make dev + - uses: actions/upload-artifact@v3 + with: + name: dev-build-files + path: ./build + + Build-docker-and-push: + name: Build the docker container image and push it to dockerhub + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v3 + with: + name: dev-build-files + path: ./build + - uses: actions/checkout@v4 + - uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - uses: docker/build-push-action@v5 + with: + push: true + file: Dockerfile.dev + tags: ${{ secrets.DOCKERHUB_USERNAME }}/pico-web-dev:latest |
