Skip to content

Commit 8227d97

Browse files
authored
Merge pull request #8 from stackhpc/only-tag-latest-on-master-releases
only attach tag 'latest' on master releases
2 parents 279dd9c + 9b038a2 commit 8227d97

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/build-and-push-images.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,14 @@ jobs:
3737
uses: docker/metadata-action@v4
3838
with:
3939
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
40+
tags: |
41+
# set latest tag for master branch
42+
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
4043
4144
- name: Build and push Docker image
4245
uses: docker/build-push-action@v4
4346
with:
4447
context: .
4548
push: ${{ github.event_name != 'pull_request' }}
4649
tags: ${{ steps.meta.outputs.tags }}
47-
labels: ${{ steps.meta.outputs.labels }}
50+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)