Skip to content

Commit fd0c914

Browse files
rahul-tulibfineran
andauthored
Update if statement to target tag starting with v (#1095)
Co-authored-by: Benjamin Fineran <[email protected]>
1 parent a4b311d commit fd0c914

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/build-and-publish-tagged-images.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ jobs:
1414

1515
steps:
1616
- name: Set up Docker Buildx
17-
if: ${{ contains(github.ref, 'refs/heads/release/') }}
17+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
1818
id: buildx
1919
uses: docker/setup-buildx-action@v2
2020
with:
2121
buildkitd-flags: --debug
2222

2323
- name: Login to Github Packages
24-
if: ${{ contains(github.ref, 'refs/heads/release/') }}
24+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
2525
uses: docker/login-action@v2
2626
with:
2727
registry: ghcr.io
2828
username: ${{ github.actor }}
2929
password: ${{ secrets.GITHUB_TOKEN }}
3030

3131
- name: Checkout code
32-
if: ${{ contains(github.ref, 'refs/heads/release/') }}
32+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
3333
uses: actions/checkout@v3
3434
with:
3535
fetch-depth: 1
@@ -39,12 +39,12 @@ jobs:
3939
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF_NAME#*/})"
4040

4141
- name: Current Version Name
42-
if: ${{ contains(github.ref, 'refs/heads/release/') }}
42+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
4343
run: |
4444
echo ${{ steps.extract_tag.outputs.tag }}
4545
4646
- name: Build and push deepsparse with all dependencies
47-
if: ${{ contains(github.ref, 'refs/heads/release/') }}
47+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
4848
uses: docker/build-push-action@v2
4949
with:
5050
context: ./docker
@@ -56,7 +56,7 @@ jobs:
5656
ghcr.io/neuralmagic/deepsparse:${{ steps.extract_tag.outputs.tag }}
5757
5858
- name: Build and push deepsparse-base
59-
if: ${{ contains(github.ref, 'refs/heads/release/') }}
59+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
6060
uses: docker/build-push-action@v2
6161
with:
6262
context: ./docker
@@ -69,5 +69,5 @@ jobs:
6969
7070
7171
- name: Image digest
72-
if: ${{ contains(github.ref, 'refs/heads/release/') }}
72+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
7373
run: echo ${{ steps.docker_build.outputs.digest }}

0 commit comments

Comments
 (0)