1414 HEAD_SHA : ${{ github.event.pull_request.head.sha }}
1515
1616jobs :
17+ generate-token :
18+ runs-on : ubuntu-latest
19+ outputs :
20+ token : ${{ steps.generate-token.outputs.token }}
21+ steps :
22+ - name : Generate token
23+ id : generate-token
24+ uses : actions/create-github-app-token@eaddb9eb7e4226c68cf4b39f167c83e5bd132b3e
25+ with :
26+ app_id : ${{ vars.AUTOMATION_APP_ID }}
27+ private_key : ${{ secrets.AUTOMATION_PRIVATE_KEY }}
1728
1829 pre-validate-performance :
1930 outputs :
@@ -36,13 +47,13 @@ jobs:
3647 echo "check-run-id=$check_run_id" >> "$GITHUB_OUTPUT"
3748
3849 validate-performance :
39- needs : pre-validate-performance
50+ needs : [ pre-validate-performance, generate-token]
4051 runs-on : ubuntu-22.04
4152 steps :
4253 - name : Invoke performance test
4354 env :
4455 CHECK_RUN_ID : ${{ needs.pre-validate-performance.outputs.check-run-id }}
45- GH_TOKEN : ${{ secrets.RELEASE_ENGINEERING_TOKEN }}
56+ GH_TOKEN : ${{ generate-token.outputs.token }}
4657 run : |
4758 jq -n \
4859 --arg ref "$HEAD_SHA" \
6172 steps :
6273 - name : Fail check run status
6374 env :
64- CHECK_RUN_ID : ${{ needs.pre-validate-performance.outputs.check-run-id }}
65- GITHUB_TOKEN : ${{ github.token }}
75+ CHECK_RUN_ID : ${{ needs.pre-validate-performance.outputs.check-run-id }}
76+ GITHUB_TOKEN : ${{ github.token }}
6677 run : |
6778 jq -n \
6879 --arg status "completed" \
@@ -97,13 +108,13 @@ jobs:
97108 echo "check-run-id=$check_run_id" >> "$GITHUB_OUTPUT"
98109
99110 validate-compiler-compatibility :
100- needs : pre-validate-compiler-compatibility
111+ needs : [ pre-validate-compiler-compatibility, generate-token]
101112 runs-on : ubuntu-22.04
102113 steps :
103114 - name : Invoke compiler compatibility test
104115 env :
105116 CHECK_RUN_ID : ${{ needs.pre-validate-compiler-compatibility.outputs.check-run-id }}
106- GITHUB_TOKEN : ${{ secrets.RELEASE_ENGINEERING_TOKEN }}
117+ GITHUB_TOKEN : ${{ generate-token.outputs.token }}
107118 run : |
108119 jq -n \
109120 --arg ref "$HEAD_SHA" \
@@ -116,14 +127,15 @@ jobs:
116127 --ref rvermeulen/release-process
117128
118129 on-failure-validate-compiler-compatibility-dispatch :
119- needs : [pre-validate-compiler-compatibility, validate-compiler-compatibility]
130+ needs :
131+ [pre-validate-compiler-compatibility, validate-compiler-compatibility]
120132 if : failure()
121133 runs-on : ubuntu-22.04
122134 steps :
123135 - name : Fail check run status
124136 env :
125- CHECK_RUN_ID : ${{ needs.pre-validate-compiler-compatibility.outputs.check-run-id }}
126- GITHUB_TOKEN : ${{ github.token }}
137+ CHECK_RUN_ID : ${{ needs.pre-validate-compiler-compatibility.outputs.check-run-id }}
138+ GITHUB_TOKEN : ${{ github.token }}
127139 run : |
128140 jq -n \
129141 --arg status "completed" \
0 commit comments