From d0f3e9b259b03234b56a2549f9afa8d7fc28a9e9 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Fri, 10 Oct 2025 16:32:20 -0400 Subject: [PATCH] .github/workflows: update qa-symlink to use pull_request_target This should allow the script to run even when a PR is submitted by an external contributor. Signed-off-by: Patrick Donnelly --- .github/workflows/qa-symlink.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/qa-symlink.yml b/.github/workflows/qa-symlink.yml index 36c4274344659..39413514c901e 100644 --- a/.github/workflows/qa-symlink.yml +++ b/.github/workflows/qa-symlink.yml @@ -1,7 +1,7 @@ --- name: "Check for missing .qa links" on: - pull_request: + pull_request_target: types: - opened - synchronize @@ -12,18 +12,20 @@ jobs: pull_request: name: "Check for missing .qa links" runs-on: ubuntu-latest + if: github.repository == 'ceph/ceph' steps: - - name: checkout PR HEAD - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + - name: Checkout main branch for pull_request_target + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - path: head + ref: 'refs/heads/main' + path: main - - name: checkout base - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + - name: checkout PR HEAD + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - path: base - ref: ${{ github.base_ref }} + ref: ${{ github.event.pull_request.head.sha }} + path: pull_request - name: verify .qa links - run: ../base/src/script/verify-qa - working-directory: head/ + run: ../main/src/script/verify-qa + working-directory: pull_request/ -- 2.39.5