Skip to content

Commit b61b898

Browse files
committed
ci: add semver labels & additional tags on tagging
1 parent 50b89d2 commit b61b898

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
runs-on: ubuntu-latest
2222

2323
outputs:
24-
tag: ${{ steps.meta.outputs.tags[0] }}
2524
digest: ${{ steps.docker_build.outputs.digest }}
2625

2726
permissions:
@@ -46,7 +45,12 @@ jobs:
4645
uses: docker/metadata-action@v5
4746
with:
4847
images: ${{ env.IMAGE_NAME }}
49-
48+
tags: |
49+
type=ref,event=branch
50+
type=ref,event=pr
51+
type=semver,pattern={{version}}
52+
type=semver,pattern={{major}}.{{minor}}
53+
5054
- name: "🐳 Set up Docker Buildx"
5155
uses: docker/setup-buildx-action@v3
5256

@@ -168,10 +172,18 @@ jobs:
168172
uses: docker/metadata-action@v5
169173
with:
170174
images: ${{ env.IMAGE_NAME }}
175+
tags: |
176+
type=ref,event=branch
177+
type=ref,event=pr
178+
type=semver,pattern={{version}}
179+
type=semver,pattern={{major}}.{{minor}}
171180
172181
- name: "📦️ Tag image in registry"
173182
run: |
174183
IMAGE="${{ env.IMAGE_NAME }}@${{ needs.build.outputs.digest }}"
175184
TAGS=$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON")
176185
177186
docker buildx imagetools create $TAGS $IMAGE
187+
188+
- name: 🔖 Add additional git tags
189+
uses: OctoPrint/actions/add-additional-tags@main

0 commit comments

Comments
 (0)