Skip to content

Commit

Permalink
adds 'latest' for images created on the default branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ArquintL committed Feb 9, 2024
1 parent 1372041 commit 5d8361a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,15 @@ jobs:
${{ env.IMAGE_LABELS }}
${{ env.CREATED_LABEL }}
tags: |
# the first 4 tags correspond to the default options
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
# use (short) commit hash as tag:
type=sha
# the first 4 tags correspond to the default options. We additionally add the commit hash
# set latest tag for default branch:
type=raw,value=latest,enable={{is_default_branch}}
- name: Get first tag
run: echo "IMAGE_TAG=$(echo "${{ steps.image-metadata.outputs.tags }}" | head -1)" >> $GITHUB_ENV
Expand Down

0 comments on commit 5d8361a

Please sign in to comment.