Skip to content

Commit 6db219f

Browse files
committed
feat: Automatically build tagged images if tag exists
1 parent e2b54d5 commit 6db219f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,11 @@ jobs:
3636
--push \
3737
--platform=linux/amd64,linux/arm64,linux/armhf \
3838
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest -f ./Dockerfile ./
39+
- name: Also create tagged image if tag exists
40+
if: startsWith(github.ref, 'refs/tags/')
41+
run: |
42+
TAG=${GITHUB_REF#refs/tags/}
43+
docker buildx build \
44+
--push \
45+
--platform=linux/amd64,linux/arm64,linux/armhf \
46+
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:$TAG -f ./Dockerfile ./

0 commit comments

Comments
 (0)