diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 8a4a9b2be..e2e9418fd 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -113,10 +113,32 @@ jobs: # - name: run tests # run: poetry run behave integration-tests/features --junit --junit-directory build/behave - docker-build-push: + docker-build-push-latest: needs: - docker-build - if: ${{ (github.ref == 'refs/heads/master') || (github.ref_type == 'tag') }} + if: ${{ github.ref == 'refs/heads/master' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: latest + labels: ${{ steps.meta.outputs.labels }} + docker-build-push-tag: + needs: + - docker-build + if: ${{ github.ref_type == 'tag' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -141,7 +163,7 @@ jobs: - packaging - documentation - unit-tests - - docker-build-push + - docker-build-push-tag # - integration-tests if: ${{ github.ref_type == 'tag' }} runs-on: ubuntu-latest