diff --git a/.github/workflows/tests-and-docker-images.yml b/.github/workflows/tests-and-docker-images.yml index d47a0006..dafb30bf 100644 --- a/.github/workflows/tests-and-docker-images.yml +++ b/.github/workflows/tests-and-docker-images.yml @@ -19,7 +19,7 @@ jobs: not-missing-manifests: runs-on: ubuntu-latest - if: ${{ !startsWith(github.ref, 'refs/tags/') }} + if: ${{ github.ref_type == 'branch' }} concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -113,10 +113,10 @@ jobs: context: . file: docker/${{ matrix.image }}/Dockerfile tags: ghcr.io/cscetbon/${{ matrix.image }}:${{ env.IMAGE }} - push: ${{ env.IMAGE == 'master' }} + push: ${{ env.IMAGE == 'master' || github.ref_type == 'tag' }} - name: Tag Docker image as latest - if: ${{ startsWith(github.ref, 'refs/tags/') }} + if: ${{ github.ref_type == 'tag' }} uses: docker/build-push-action@v2.10.0 with: context: .