@@ -153,11 +153,14 @@ jobs:
153153 name : diff-${{ matrix.system }}
154154 path : diff/*
155155
156- process :
157- name : Process
156+ tag :
157+ name : Tag
158158 runs-on : ubuntu-24.04-arm
159159 needs : [ prepare, outpaths ]
160160 if : needs.prepare.outputs.targetSha
161+ permissions :
162+ pull-requests : write
163+ statuses : write
161164 steps :
162165 - name : Download output paths and eval stats for all systems
163166 uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
@@ -206,46 +209,6 @@ jobs:
206209 name : comparison
207210 path : comparison/*
208211
209- # Separate job to have a very tightly scoped PR write token
210- tag :
211- name : Tag
212- runs-on : ubuntu-24.04-arm
213- needs : [ prepare, process ]
214- if : needs.prepare.outputs.targetSha
215- permissions :
216- pull-requests : write
217- statuses : write
218- steps :
219- # See ./codeowners-v2.yml, reuse the same App because we need the same permissions
220- # Can't use the token received from permissions above, because it can't get enough permissions
221- - uses : actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
222- if : vars.OWNER_APP_ID
223- id : app-token
224- with :
225- app-id : ${{ vars.OWNER_APP_ID }}
226- private-key : ${{ secrets.OWNER_APP_PRIVATE_KEY }}
227- permission-administration : read
228- permission-members : read
229- permission-pull-requests : write
230-
231- - name : Download comparison result
232- uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
233- with :
234- name : comparison
235- path : comparison
236-
237- - name : Install Nix
238- uses : cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
239-
240- # Important: This workflow job runs with extra permissions,
241- # so we need to make sure to not run untrusted code from PRs
242- - name : Check out Nixpkgs at the target commit
243- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
244- with :
245- ref : ${{ needs.prepare.outputs.targetSha }}
246- path : trusted
247- sparse-checkout : ci
248-
249212 - name : Build the requestReviews derivation
250213 run : nix-build trusted/ci -A requestReviews
251214
@@ -303,6 +266,18 @@ jobs:
303266 "/repos/$GITHUB_REPOSITORY/statuses/$PR_HEAD_SHA" \
304267 -f "context=Eval / Summary" -f "state=success" -f "description=$description" -f "target_url=$target_url"
305268
269+ # See ./codeowners-v2.yml, reuse the same App because we need the same permissions
270+ # Can't use the token received from permissions above, because it can't get enough permissions
271+ - uses : actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
272+ if : vars.OWNER_APP_ID
273+ id : app-token
274+ with :
275+ app-id : ${{ vars.OWNER_APP_ID }}
276+ private-key : ${{ secrets.OWNER_APP_PRIVATE_KEY }}
277+ permission-administration : read
278+ permission-members : read
279+ permission-pull-requests : write
280+
306281 - name : Requesting maintainer reviews
307282 if : ${{ steps.app-token.outputs.token && github.repository_owner == 'NixOS' }}
308283 env :
0 commit comments