···
-
OWNER_RO_APP_PRIVATE_KEY:
···
GH_TOKEN: ${{ github.token }}
run: gh api /rate_limit | jq
-
# For checking code owners, this job depends on a GitHub App with the following permissions:
-
# - Repository > Administration: read-only
-
# - Organization > Members: read-only
-
# - Install App on this repository, setting these variables:
-
# - OWNER_RO_APP_ID (variable)
-
# - OWNER_RO_APP_PRIVATE_KEY (secret)
-
# This should not use the same app as the job to request reviewers, because this job requires
-
# handling untrusted PR input.
runs-on: ubuntu-24.04-arm
-
continue-on-error: ${{ inputs.ownersCanFail }}
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
···
uses: ./.github/actions/checkout
merged-as-untrusted-at: ${{ inputs.mergedSha }}
-
target-as-trusted-at: ${{ inputs.targetSha }}
- uses: cachix/install-nix-action@a809471b5c7c913aa67bec8f459a11a0decc3fce # v31
···
- name: Build codeowners validator
-
run: nix-build nixpkgs/trusted/ci --arg nixpkgs ./nixpkgs/trusted-pinned -A codeownersValidator
-
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
-
if: github.event_name == 'pull_request_target' && vars.OWNER_RO_APP_ID
-
app-id: ${{ vars.OWNER_RO_APP_ID }}
-
private-key: ${{ secrets.OWNER_RO_APP_PRIVATE_KEY }}
-
permission-administration: read
-
permission-members: read
-
- name: Log current API rate limits
-
if: steps.app-token.outputs.token
-
GH_TOKEN: ${{ steps.app-token.outputs.token }}
-
run: gh api /rate_limit | jq
- name: Validate codeowners
-
if: steps.app-token.outputs.token
OWNERS_FILE: nixpkgs/untrusted/ci/OWNERS
-
GITHUB_ACCESS_TOKEN: ${{ steps.app-token.outputs.token }}
REPOSITORY_PATH: nixpkgs/untrusted
-
OWNER_CHECKER_REPOSITORY: ${{ github.repository }}
# Set this to "notowned,avoid-shadowing" to check that all files are owned by somebody
EXPERIMENTAL_CHECKS: "avoid-shadowing"
run: result/bin/codeowners-validator
-
- name: Log current API rate limits
-
if: steps.app-token.outputs.token
-
GH_TOKEN: ${{ steps.app-token.outputs.token }}
-
run: gh api /rate_limit | jq