Skip to content

Commit

Permalink
Merge pull request #8 from stackhpc/only-tag-latest-on-master-releases
Browse files Browse the repository at this point in the history
only attach tag 'latest' on master releases
  • Loading branch information
jovial authored Apr 13, 2023
2 parents 279dd9c + 9b038a2 commit 8227d97
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build-and-push-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@ jobs:
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
# set latest tag for master branch
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 8227d97

Please sign in to comment.