···
24
-
OWNER_RO_APP_PRIVATE_KEY:
···
GH_TOKEN: ${{ github.token }}
run: gh api /rate_limit | jq
75
-
# For checking code owners, this job depends on a GitHub App with the following permissions:
77
-
# - Repository > Administration: read-only
78
-
# - Organization > Members: read-only
79
-
# - Install App on this repository, setting these variables:
80
-
# - OWNER_RO_APP_ID (variable)
81
-
# - OWNER_RO_APP_PRIVATE_KEY (secret)
83
-
# This should not use the same app as the job to request reviewers, because this job requires
84
-
# handling untrusted PR input.
runs-on: ubuntu-24.04-arm
87
-
continue-on-error: ${{ inputs.ownersCanFail }}
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
···
uses: ./.github/actions/checkout
merged-as-untrusted-at: ${{ inputs.mergedSha }}
97
-
target-as-trusted-at: ${{ inputs.targetSha }}
- uses: cachix/install-nix-action@a809471b5c7c913aa67bec8f459a11a0decc3fce # v31
···
- name: Build codeowners validator
110
-
run: nix-build nixpkgs/trusted/ci --arg nixpkgs ./nixpkgs/trusted-pinned -A codeownersValidator
112
-
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
113
-
if: github.event_name == 'pull_request_target' && vars.OWNER_RO_APP_ID
116
-
app-id: ${{ vars.OWNER_RO_APP_ID }}
117
-
private-key: ${{ secrets.OWNER_RO_APP_PRIVATE_KEY }}
118
-
permission-administration: read
119
-
permission-members: read
121
-
- name: Log current API rate limits
122
-
if: steps.app-token.outputs.token
124
-
GH_TOKEN: ${{ steps.app-token.outputs.token }}
125
-
run: gh api /rate_limit | jq
93
+
run: nix-build nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A codeownersValidator
- name: Validate codeowners
128
-
if: steps.app-token.outputs.token
OWNERS_FILE: nixpkgs/untrusted/ci/OWNERS
131
-
GITHUB_ACCESS_TOKEN: ${{ steps.app-token.outputs.token }}
REPOSITORY_PATH: nixpkgs/untrusted
133
-
OWNER_CHECKER_REPOSITORY: ${{ github.repository }}
99
+
# Omits "owners", which checks whether GitHub handles exist, but fails with nested team
101
+
CHECKS: "duppatterns,files,syntax"
# Set this to "notowned,avoid-shadowing" to check that all files are owned by somebody
EXPERIMENTAL_CHECKS: "avoid-shadowing"
run: result/bin/codeowners-validator
138
-
- name: Log current API rate limits
139
-
if: steps.app-token.outputs.token
141
-
GH_TOKEN: ${{ steps.app-token.outputs.token }}
142
-
run: gh api /rate_limit | jq