Skip to content

Commit ca48ba4

Browse files
committed
support pushing if author's pr
1 parent 0146f11 commit ca48ba4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ jobs:
4040
uses: docker/setup-buildx-action@v1
4141
- name: Login to DockerHub
4242
uses: docker/login-action@v1
43-
if: github.event.ref_type == 'tag' || github.event_name == 'workflow_dispatch'
43+
if: github.event.pull_request.user.login == github.repository_owner || github.event.ref_type == 'tag' || github.event_name == 'workflow_dispatch'
4444
with:
4545
username: ${{ secrets.DOCKERHUB_USERNAME }}
4646
password: ${{ secrets.DOCKERHUB_TOKEN }}
4747
- name: Login to GitHub Container Registry
4848
uses: docker/login-action@v1
49-
if: github.event.ref_type == 'tag' || github.event_name == 'workflow_dispatch'
49+
if: github.event.pull_request.user.login == github.repository_owner || github.event.ref_type == 'tag' || github.event_name == 'workflow_dispatch'
5050
with:
5151
registry: ghcr.io
5252
username: ${{ github.repository_owner }}
@@ -56,7 +56,7 @@ jobs:
5656
with:
5757
context: .
5858
platforms: ${{ github.event.ref_type == 'tag' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
59-
push: ${{ github.event.ref_type == 'tag' || github.event_name == 'workflow_dispatch' }}
59+
push: ${{ github.event.pull_request.user.login == github.repository_owner || github.event.ref_type == 'tag' || github.event_name == 'workflow_dispatch' }}
6060
tags: ${{ steps.meta.outputs.tags }}
6161
labels: ${{ steps.meta.outputs.labels }}
6262
- name: Docker Hub Description

0 commit comments

Comments
 (0)