diff --git a/.github/workflows/build-and-publish-tagged-images.yaml b/.github/workflows/build-and-publish-tagged-images.yaml index 7bb9c11e47..27d010a8e0 100644 --- a/.github/workflows/build-and-publish-tagged-images.yaml +++ b/.github/workflows/build-and-publish-tagged-images.yaml @@ -14,14 +14,14 @@ jobs: steps: - name: Set up Docker Buildx - if: ${{ contains(github.ref, 'refs/heads/release/') }} + if: ${{ startsWith(github.ref, 'refs/tags/v') }} id: buildx uses: docker/setup-buildx-action@v2 with: buildkitd-flags: --debug - name: Login to Github Packages - if: ${{ contains(github.ref, 'refs/heads/release/') }} + if: ${{ startsWith(github.ref, 'refs/tags/v') }} uses: docker/login-action@v2 with: registry: ghcr.io @@ -29,7 +29,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Checkout code - if: ${{ contains(github.ref, 'refs/heads/release/') }} + if: ${{ startsWith(github.ref, 'refs/tags/v') }} uses: actions/checkout@v3 with: fetch-depth: 1 @@ -39,12 +39,12 @@ jobs: run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF_NAME#*/})" - name: Current Version Name - if: ${{ contains(github.ref, 'refs/heads/release/') }} + if: ${{ startsWith(github.ref, 'refs/tags/v') }} run: | echo ${{ steps.extract_tag.outputs.tag }} - name: Build and push deepsparse with all dependencies - if: ${{ contains(github.ref, 'refs/heads/release/') }} + if: ${{ startsWith(github.ref, 'refs/tags/v') }} uses: docker/build-push-action@v2 with: context: ./docker @@ -56,7 +56,7 @@ jobs: ghcr.io/neuralmagic/deepsparse:${{ steps.extract_tag.outputs.tag }} - name: Build and push deepsparse-base - if: ${{ contains(github.ref, 'refs/heads/release/') }} + if: ${{ startsWith(github.ref, 'refs/tags/v') }} uses: docker/build-push-action@v2 with: context: ./docker @@ -69,5 +69,5 @@ jobs: - name: Image digest - if: ${{ contains(github.ref, 'refs/heads/release/') }} + if: ${{ startsWith(github.ref, 'refs/tags/v') }} run: echo ${{ steps.docker_build.outputs.digest }}