Skip to content

Commit cb0cd35

Browse files
Merge pull request #3 from dgarciabriseno/docker
Create proper docker tags on release
2 parents 363c388 + 10529c9 commit cb0cd35

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/workflow.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,23 @@ jobs:
7777
with:
7878
username: ${{ secrets.DOCKERHUB_USERNAME }}
7979
password: ${{ secrets.DOCKERHUB_TOKEN }}
80+
- name: Docker meta
81+
id: meta
82+
uses: docker/metadata-action@v5
83+
with:
84+
images: dgarciabriseno/hv-coordinator
85+
# generate Docker tags based on the tagged release
86+
tags: type=semver,pattern={{version}}
8087
- name: Build and push Docker images
8188
uses: docker/build-push-action@v5.3.0
8289
with:
8390
# Build's context is the set of files located in the specified PATH or URL
8491
context: app
85-
# List of metadata for an image
86-
labels: ${{ github.ref_name }},latest
8792
# List of target platforms for build
8893
platforms: linux/amd64,linux/arm64
8994
# List of tags
90-
tags: dgarciabriseno/hv-coordinator
95+
tags: ${{ steps.meta.outputs.tags }}
96+
labels: ${{ steps.meta.outputs.labels }}
9197
# Push to hub
9298
push: ${{ github.event_name == 'push' && github.ref_type == 'tag'}}
9399

0 commit comments

Comments
 (0)