Skip to content

Commit 67b5116

Browse files
committed
hopefully this works with tags first try
1 parent 175e6e5 commit 67b5116

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/docker-image.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ name: Create and publish Container
44
on:
55
push:
66
branches: ['master']
7+
tags: ['*']
8+
release:
9+
types: [published]
710

811
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
912
env:
@@ -37,7 +40,9 @@ jobs:
3740
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
3841
with:
3942
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
40-
tags: latest
43+
tags: |
44+
latest
45+
${{ github.ref_name }}
4146
# 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.
4247
# 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.
4348
# 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)