Skip to content

Commit

Permalink
Update if statement to target tag starting with v (#1095)
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Fineran <bfineran@users.noreply.github.com>
  • Loading branch information
2 people authored and horheynm committed Jul 6, 2023
1 parent 0bd7898 commit 67fc411
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build-and-publish-tagged-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ 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
username: ${{ github.actor }}
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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 }}

0 comments on commit 67fc411

Please sign in to comment.