diff --git a/.github/workflows/check-maintainers-sorted.yaml b/.github/workflows/check-maintainers-sorted.yaml index 73987f9b9168..2c2473250d82 100644 --- a/.github/workflows/check-maintainers-sorted.yaml +++ b/.github/workflows/check-maintainers-sorted.yaml @@ -1,7 +1,7 @@ name: "Check that maintainer list is sorted" on: - pull_request: + pull_request_target: paths: - 'maintainers/maintainer-list.nix' permissions: @@ -13,6 +13,9 @@ jobs: if: github.repository_owner == 'NixOS' steps: - uses: actions/checkout@v3 + with: + # pull_request_target checks out the base branch by default + ref: refs/pull/${{ github.event.pull_request.number }}/merge - uses: cachix/install-nix-action@v19 with: # explicitly enable sandbox