Skip to content

Commit 8b9a59b

Browse files
committedAug 16, 2024
Adjust tags for metadata job
1 parent 94f6fb8 commit 8b9a59b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎.github/workflows/dockertag.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ jobs:
3131
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
3232
with:
3333
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
34+
tags: |
35+
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
36+
type=sha,format=long
37+
type=ref,event=tag
3438
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
3539
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
3640
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.

0 commit comments

Comments
 (0)
Failed to load comments.