File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 4141 uses : docker/setup-buildx-action@v3
4242
4343 - name : Log in to registry
44+ if : github.event_name == 'push'
4445 uses : docker/login-action@v3
4546 with :
4647 registry : ghcr.io
@@ -53,11 +54,15 @@ jobs:
5354 if [ "${{ github.ref_type }}" = "tag" ]; then
5455 tag="${{ github.ref_name }}"
5556 else
56- case "${{ github.ref_name }}" in
57- main)
58- tag="unstable"
59- ;;
60- esac
57+ if "${{ github.event_name }}" = "pull_request" ]; then
58+ tag="pr-${{ github.event.pull_request.number }}"
59+ else
60+ case "${{ github.ref_name }}" in
61+ main)
62+ tag="unstable"
63+ ;;
64+ esac
65+ fi
6166 fi
6267 if [ -z "$tag" ]; then
6368 echo "ERROR: failed to determine image tag"
7277 file : ./plugins/Dockerfile
7378 build-args : |
7479 PLUGIN=${{ matrix.image }}
75- push : true
76- platforms : linux/amd64,linux/arm64
80+ push : ${{ github.event_name == 'push' }}
81+ platforms : ${{ github.event_name == 'push' && ' linux/amd64,linux/arm64' || 'linux/amd64' }}
7782 tags : ghcr.io/${{ github.repository }}/plugins/${{ matrix.image }}:${{ env.TAG_NAME }}
You can’t perform that action at this time.
0 commit comments