Skip to content

Commit 1588990

Browse files
committed
Update: add latest tag to image
1 parent 1e17dfc commit 1588990

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/docker-image.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
3939
with:
4040
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
41+
tags: |
42+
# set latest tag for default branch
43+
type=raw,value=latest,enable={{is_default_branch}}
4144
# 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.
4245
# 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.
4346
# 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)