@@ -27,18 +27,25 @@ jobs:
2727 steps :
2828 - uses : actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1
2929 id : app-token
30+ continue-on-error : true
3031 with :
3132 app-id : " 2729701"
3233 private-key : ${{ secrets.GH_APP_PRIVATE_KEY }}
34+ - uses : actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1
35+ id : app-token-fallback
36+ if : steps.app-token.outcome == 'failure'
37+ with :
38+ app-id : " 2971289"
39+ private-key : ${{ secrets.GH_APP_PRIVATE_KEY_FALLBACK }}
3340 - uses : actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5
3441 with :
3542 configuration-path : .github/labeler.yml
36- repo-token : ${{ steps.app-token.outputs.token }}
43+ repo-token : ${{ steps.app-token.outputs.token || steps.app-token-fallback.outputs.token }}
3744 sync-labels : true
3845 - name : Apply PR size label
3946 uses : actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
4047 with :
41- github-token : ${{ steps.app-token.outputs.token }}
48+ github-token : ${{ steps.app-token.outputs.token || steps.app-token-fallback.outputs.token }}
4249 script : |
4350 const pullRequest = context.payload.pull_request;
4451 if (!pullRequest) {
@@ -127,7 +134,7 @@ jobs:
127134 - name : Apply maintainer or trusted-contributor label
128135 uses : actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
129136 with :
130- github-token : ${{ steps.app-token.outputs.token }}
137+ github-token : ${{ steps.app-token.outputs.token || steps.app-token-fallback.outputs.token }}
131138 script : |
132139 const login = context.payload.pull_request?.user?.login;
133140 if (!login) {
@@ -204,13 +211,20 @@ jobs:
204211 steps :
205212 - uses : actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1
206213 id : app-token
214+ continue-on-error : true
207215 with :
208216 app-id : " 2729701"
209217 private-key : ${{ secrets.GH_APP_PRIVATE_KEY }}
218+ - uses : actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1
219+ id : app-token-fallback
220+ if : steps.app-token.outcome == 'failure'
221+ with :
222+ app-id : " 2971289"
223+ private-key : ${{ secrets.GH_APP_PRIVATE_KEY_FALLBACK }}
210224 - name : Backfill PR labels
211225 uses : actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
212226 with :
213- github-token : ${{ steps.app-token.outputs.token }}
227+ github-token : ${{ steps.app-token.outputs.token || steps.app-token-fallback.outputs.token }}
214228 script : |
215229 const owner = context.repo.owner;
216230 const repo = context.repo.repo;
@@ -444,13 +458,20 @@ jobs:
444458 steps :
445459 - uses : actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1
446460 id : app-token
461+ continue-on-error : true
447462 with :
448463 app-id : " 2729701"
449464 private-key : ${{ secrets.GH_APP_PRIVATE_KEY }}
465+ - uses : actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1
466+ id : app-token-fallback
467+ if : steps.app-token.outcome == 'failure'
468+ with :
469+ app-id : " 2971289"
470+ private-key : ${{ secrets.GH_APP_PRIVATE_KEY_FALLBACK }}
450471 - name : Apply maintainer or trusted-contributor label
451472 uses : actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
452473 with :
453- github-token : ${{ steps.app-token.outputs.token }}
474+ github-token : ${{ steps.app-token.outputs.token || steps.app-token-fallback.outputs.token }}
454475 script : |
455476 const login = context.payload.issue?.user?.login;
456477 if (!login) {
0 commit comments