File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 1818 REGISTRY : ghcr.io
1919 IMAGE_NAME : ${{ github.repository }}
2020
21+ permissions :
22+ contents : read
23+ packages : write
24+ attestations : write
25+ id-token : write
26+
2127jobs :
2228 build-and-push-image :
2329 runs-on : ubuntu-latest
@@ -31,13 +37,21 @@ jobs:
3137 registry : ${{ env.REGISTRY }}
3238 username : ${{ github.actor }}
3339 password : ${{ secrets.GITHUB_TOKEN }}
34-
40+ ref : ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }}
41+
3542 - name : Extract metadata (tags, labels) for Docker
3643 id : meta
3744 uses : docker/metadata-action@v5
3845 with :
3946 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
40-
47+ tags : |
48+ # Defaults for normal push/PR/schedule events:
49+ type=schedule
50+ type=ref,event=branch
51+ type=ref,event=tag
52+ type=ref,event=pr
53+ type=raw,value=latest,enable={{is_default_branch}}
54+ type=raw,value=${{ inputs.tag }},event=workflow_dispatch
4155 - name : Set up QEMU
4256 uses : docker/setup-qemu-action@v3
4357
You can’t perform that action at this time.
0 commit comments