Skip to content

Commit 43a3e84

Browse files
committed
Build/Test Tools: Use ‘pull_request.head.ref` when checking built files.
Because `pull_request_target` happens in the context of the base branch, attempting to checkout `github.head_ref` results in a failure when the workflow comes from a fork. This adjusts the options passed to `actions/checkout` to use the repository that actually contains the test branch. See #62221. git-svn-id: https://develop.svn.wordpress.org/trunk@60052 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 741464a commit 43a3e84

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/reusable-check-built-files.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ jobs:
8383
- name: Checkout repository
8484
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8585
with:
86-
ref: ${{ github.head_ref }}
86+
repository: ${{ github.event.pull_request.head.repo.full_name }}
87+
ref: ${{ github.event.pull_request.head.ref }}
8788
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
8889
token: ${{ env.ACCESS_TOKEN }}
8990

0 commit comments

Comments
 (0)