Skip to content

Commit dc6ab1e

Browse files
authored
Merge pull request #2 from HW618/dev
```
2 parents f68bea1 + 8f69c22 commit dc6ab1e

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/docker-images.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ on:
33
push:
44
branches:
55
- main
6-
pull_request:
7-
branches: [main]
8-
types: [closed]
6+
tags:
7+
- 'v*'
98

109
env:
1110
REGISTRY: ghcr.io
@@ -38,19 +37,26 @@ jobs:
3837
uses: docker/metadata-action@v5
3938
with:
4039
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
40+
tags: |
41+
type=ref,event=branch
42+
type=ref,event=pr
43+
type=semver,pattern={{version}}
44+
type=semver,pattern={{major}}.{{minor}}
4145
4246
- name: "build and push docker image"
47+
id: build-and-push
4348
uses: docker/build-push-action@v5
4449
with:
4550
context: .
4651
push: true
52+
file: ./docker/Dockerfile
4753
tags: ${{ steps.meta.outputs.tags }}
48-
file: docker/Dockerfile
4954
labels: ${{ steps.meta.outputs.labels }}
55+
platforms: linux/amd64,linux/arm64
5056

5157
- name: Genarate artifact attestation
5258
uses: actions/attest-build-provenance@v3
5359
with:
5460
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
55-
subject-digest: ${{ steps.meta.outputs.digest }}
61+
subject-digest: ${{ steps.build-and-push.outputs.digest }}
5662
push-to-registry: true

0 commit comments

Comments
 (0)