File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change 66 - main
77 tags :
88 - v[0-9]+.[0-9]+.[0-9]+
9+ pull_request :
910
1011concurrency :
1112 group : ${{ github.workflow }}-${{ github.ref }}
4142 uses : docker/setup-buildx-action@v3
4243
4344 - name : Log in to registry
45+ if : github.event_name == 'push'
4446 uses : docker/login-action@v3
4547 with :
4648 registry : ghcr.io
@@ -53,11 +55,15 @@ jobs:
5355 if [ "${{ github.ref_type }}" = "tag" ]; then
5456 tag="${{ github.ref_name }}"
5557 else
56- case "${{ github.ref_name }}" in
57- main)
58- tag="unstable"
59- ;;
60- esac
58+ if [ "${{ github.event_name }}" = "pull_request" ]; then
59+ tag="pr-${{ github.event.pull_request.number }}"
60+ else
61+ case "${{ github.ref_name }}" in
62+ main)
63+ tag="unstable"
64+ ;;
65+ esac
66+ fi
6167 fi
6268 if [ -z "$tag" ]; then
6369 echo "ERROR: failed to determine image tag"
7278 file : ./plugins/Dockerfile
7379 build-args : |
7480 PLUGIN=${{ matrix.image }}
75- push : true
76- platforms : linux/amd64,linux/arm64
81+ push : ${{ github.event_name == 'push' }}
82+ platforms : ${{ github.event_name == 'push' && ' linux/amd64,linux/arm64' || 'linux/amd64' }}
7783 tags : ghcr.io/${{ github.repository }}/plugins/${{ matrix.image }}:${{ env.TAG_NAME }}
You can’t perform that action at this time.
0 commit comments