Skip to content

Commit 628b2c2

Browse files
authored
Merge pull request #981 from traPtitech/ci/docker-image-commit-hash-tag
ci: Dockerイメージにコミットハッシュのタグを追加
2 parents de3d971 + 3290b09 commit 628b2c2

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/image.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,20 @@ jobs:
2424
registry: ghcr.io
2525
username: traptitech
2626
password: ${{ secrets.GITHUB_TOKEN }}
27+
- name: Docker meta
28+
id: meta
29+
uses: docker/metadata-action@v5
30+
with:
31+
images: ghcr.io/traptitech/jomon
32+
tags: |
33+
type=raw,value=latest
34+
type=sha,format=long,prefix=
2735
- name: Build and push
2836
uses: docker/build-push-action@v6
2937
with:
3038
context: .
3139
push: ${{ github.event_name != 'pull_request' }}
3240
platforms: linux/amd64
33-
tags: |
34-
ghcr.io/traptitech/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
41+
tags: ${{ steps.meta.outputs.tags }}
42+
labels: ${{ steps.meta.outputs.labels }}
43+
provenance: false

0 commit comments

Comments
 (0)