File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 4242 registry : ghcr.io
4343 username : ${{ github.repository_owner }}
4444 password : ${{ secrets.GITHUB_TOKEN }}
45- - name : Build and push
46- uses : docker/build-push-action@v2
45+ # Build the Docker image for all events, but do not push
46+ # We use linux/amd64 for the build only as it's faster on GitHub Actions
47+ - name : Build image
48+ uses : docker/build-push-action@v5
49+ with :
50+ context : .
51+ platforms : linux/amd64
52+ push : false
53+ tags : ${{ steps.meta.outputs.tags }}
54+ labels : ${{ steps.meta.outputs.labels }}
55+ # Push the Docker image only when a GitHub Release is published
56+ - name : Push image
57+ if : github.event_name == 'release' && github.event.action == 'published'
58+ uses : docker/build-push-action@v5
4759 with :
4860 context : .
4961 platforms : linux/amd64,linux/arm64
You can’t perform that action at this time.
0 commit comments