Skip to content

Commit 791dc9d

Browse files
authored
Use commit hash to tag container images (#176)
1 parent 34db123 commit 791dc9d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/docker.build.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
branches:
66
- 'main'
7-
tags:
8-
- '*'
97
pull_request:
108

119
jobs:
@@ -21,6 +19,8 @@ jobs:
2119
uses: crazy-max/ghaction-docker-meta@v4.3.0
2220
with:
2321
images: ghcr.io/${{ github.repository }}
22+
tags: |
23+
type=sha
2424
-
2525
name: Set up QEMU
2626
uses: docker/setup-qemu-action@v2.1.0
@@ -38,7 +38,6 @@ jobs:
3838
-
3939
name: Login to GitHub Container Registry
4040
uses: docker/login-action@v2.1.0
41-
if: github.event_name != 'pull_request'
4241
with:
4342
registry: ghcr.io
4443
username: ${{ github.repository_owner }}
@@ -52,6 +51,6 @@ jobs:
5251
platforms: linux/amd64
5352
cache-from: type=local,src=/tmp/.buildx-cache
5453
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache
55-
push: ${{ github.event_name != 'pull_request' }}
54+
push: true
5655
tags: ${{ steps.docker_meta.outputs.tags }}
5756
labels: ${{ steps.docker_meta.outputs.labels }}

0 commit comments

Comments
 (0)