Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Commit d9c7813

Browse files
committed
use pull_request_target
1 parent 4b95abb commit d9c7813

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/checks.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: checks
33
on:
44
push:
55
branches: [main]
6-
pull_request:
7-
types: [opened, synchronize, reopened]
6+
pull_request_target:
87
branches: [main]
98
workflow_dispatch:
109

@@ -62,10 +61,15 @@ jobs:
6261
contents: write
6362
steps:
6463
- name: Checkout
64+
if: ${{ github.event_name != 'pull_request_target' }}
6565
uses: actions/checkout@v4
66+
67+
- name: Checkout (pull_request_target)
68+
uses: actions/checkout@v4
69+
if: ${{ github.event_name == 'pull_request_target' }}
6670
with:
6771
ref: ${{ github.head_ref }}
68-
repository: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name || github.repository }}
72+
repository: ${{ github.event.pull_request.head.repo.full_name }}
6973

7074
- name: Setup pnpm
7175
uses: ./.github/actions/setup-pnpm
@@ -77,5 +81,4 @@ jobs:
7781
if: ${{ always() }}
7882
uses: stefanzweifel/git-auto-commit-action@v5
7983
with:
80-
commit_message: "format"
8184
push_options: "--force-with-lease"

0 commit comments

Comments
 (0)