14
14
HEAD_SHA : ${{ github.event.pull_request.head.sha }}
15
15
16
16
jobs :
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 }}
17
28
18
29
pre-validate-performance :
19
30
outputs :
@@ -36,13 +47,13 @@ jobs:
36
47
echo "check-run-id=$check_run_id" >> "$GITHUB_OUTPUT"
37
48
38
49
validate-performance :
39
- needs : pre-validate-performance
50
+ needs : [ pre-validate-performance, generate-token]
40
51
runs-on : ubuntu-22.04
41
52
steps :
42
53
- name : Invoke performance test
43
54
env :
44
55
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 }}
46
57
run : |
47
58
jq -n \
48
59
--arg ref "$HEAD_SHA" \
61
72
steps :
62
73
- name : Fail check run status
63
74
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 }}
66
77
run : |
67
78
jq -n \
68
79
--arg status "completed" \
@@ -97,13 +108,13 @@ jobs:
97
108
echo "check-run-id=$check_run_id" >> "$GITHUB_OUTPUT"
98
109
99
110
validate-compiler-compatibility :
100
- needs : pre-validate-compiler-compatibility
111
+ needs : [ pre-validate-compiler-compatibility, generate-token]
101
112
runs-on : ubuntu-22.04
102
113
steps :
103
114
- name : Invoke compiler compatibility test
104
115
env :
105
116
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 }}
107
118
run : |
108
119
jq -n \
109
120
--arg ref "$HEAD_SHA" \
@@ -116,14 +127,15 @@ jobs:
116
127
--ref rvermeulen/release-process
117
128
118
129
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]
120
132
if : failure()
121
133
runs-on : ubuntu-22.04
122
134
steps :
123
135
- name : Fail check run status
124
136
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 }}
127
139
run : |
128
140
jq -n \
129
141
--arg status "completed" \
0 commit comments