From: Patrick Donnelly Date: Fri, 10 Oct 2025 20:32:20 +0000 (-0400) Subject: .github/workflows: update qa-symlink to use pull_request_target X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d0f3e9b259b03234b56a2549f9afa8d7fc28a9e9;p=ceph.git .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 --- 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/