11name : Eval
22
33on :
4+ pull_request :
5+ paths :
6+ - .github/workflows/eval.yml
47 pull_request_target :
58 types : [opened, ready_for_review, synchronize, reopened]
69 push :
@@ -175,6 +178,7 @@ jobs:
175178 # See ./codeowners-v2.yml, reuse the same App because we need the same permissions
176179 # Can't use the token received from permissions above, because it can't get enough permissions
177180 - uses : actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
181+ if : vars.OWNER_APP_ID
178182 id : app-token
179183 with :
180184 app-id : ${{ vars.OWNER_APP_ID }}
@@ -205,6 +209,7 @@ jobs:
205209 run : nix-build base/ci -A requestReviews
206210
207211 - name : Labelling pull request
212+ if : ${{ github.event_name == 'pull_request_target' && github.repository_owner == 'NixOS' }}
208213 run : |
209214 # Get all currently set rebuild labels
210215 gh api \
@@ -239,7 +244,7 @@ jobs:
239244 NUMBER : ${{ github.event.number }}
240245
241246 - name : Add eval summary to commit statuses
242- if : ${{ github.event_name == 'pull_request_target' }}
247+ if : ${{ github.event_name == 'pull_request_target' && github.repository_owner == 'NixOS' }}
243248 run : |
244249 description=$(jq -r '
245250 "Package: added " + (.attrdiff.added | length | tostring) +
@@ -259,6 +264,7 @@ jobs:
259264 NUMBER : ${{ github.event.number }}
260265
261266 - name : Requesting maintainer reviews
267+ if : ${{ steps.app-token.outputs.token && github.repository_owner == 'NixOS' }}
262268 run : |
263269 # maintainers.json contains GitHub IDs. Look up handles to request reviews from.
264270 # There appears to be no API to request reviews based on GitHub IDs
0 commit comments