17
17
required : false
18
18
19
19
jobs :
20
- find_valid_pat :
21
- name : " Find a PAT with room for actions"
22
- timeout-minutes : 10
23
- runs-on : ubuntu-latest
24
- outputs :
25
- pat : ${{ steps.variables.outputs.pat }}
26
- steps :
27
- - name : Checkout Airbyte
28
- uses : actions/checkout@v3
29
- - name : Check PAT rate limits
30
- id : variables
31
- run : |
32
- ./tools/bin/find_non_rate_limited_PAT \
33
- ${{ secrets.AIRBYTEIO_PAT }} \
34
- ${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \
35
- ${{ secrets.SUPERTOPHER_PAT }} \
36
- ${{ secrets.DAVINCHIA_PAT }}
37
20
start-gke-kube-acceptance-test-runner :
38
21
timeout-minutes : 10
39
22
name : Start GKE Kube Acceptance Test EC2 Runner
40
23
runs-on : ubuntu-latest
41
- needs : find_valid_pat
42
24
outputs :
43
25
label : ${{ steps.start-ec2-runner.outputs.label }}
44
26
ec2-instance-id : ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
@@ -48,13 +30,20 @@ jobs:
48
30
with :
49
31
repository : ${{ github.event.inputs.repo }}
50
32
ref : ${{ github.event.inputs.gitref }}
33
+ - name : Check PAT rate limits
34
+ run : |
35
+ ./tools/bin/find_non_rate_limited_PAT \
36
+ ${{ secrets.AIRBYTEIO_PAT }} \
37
+ ${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \
38
+ ${{ secrets.SUPERTOPHER_PAT }} \
39
+ ${{ secrets.DAVINCHIA_PAT }}
51
40
- name : Start AWS Runner
52
41
id : start-ec2-runner
53
42
uses : ./.github/actions/start-aws-runner
54
43
with :
55
44
aws-access-key-id : ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
56
45
aws-secret-access-key : ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
57
- github-token : ${{ needs.find_valid_pat.outputs.pat }}
46
+ github-token : ${{ env.PAT }}
58
47
gke-kube-acceptance-test :
59
48
# In case of self-hosted EC2 errors, removed the `needs` line and switch back to running on ubuntu-latest.
60
49
needs : start-gke-kube-acceptance-test-runner # required to start the main job when the runner is ready
@@ -146,7 +135,6 @@ jobs:
146
135
needs :
147
136
- start-gke-kube-acceptance-test-runner # required to get output from the start-runner job
148
137
- gke-kube-acceptance-test # required to wait when the main job is done
149
- - find_valid_pat
150
138
runs-on : ubuntu-latest
151
139
if : ${{ always() }}
152
140
steps :
@@ -156,10 +144,22 @@ jobs:
156
144
aws-access-key-id : ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
157
145
aws-secret-access-key : ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
158
146
aws-region : us-east-2
147
+ - name : Checkout Airbyte
148
+ uses : actions/checkout@v3
149
+ with :
150
+ repository : ${{ github.event.inputs.repo }}
151
+ ref : ${{ github.event.inputs.gitref }}
152
+ - name : Check PAT rate limits
153
+ run : |
154
+ ./tools/bin/find_non_rate_limited_PAT \
155
+ ${{ secrets.AIRBYTEIO_PAT }} \
156
+ ${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \
157
+ ${{ secrets.SUPERTOPHER_PAT }} \
158
+ ${{ secrets.DAVINCHIA_PAT }}
159
159
- name : Stop EC2 runner
160
160
uses :
supertopher/[email protected]
161
161
with :
162
162
mode : stop
163
- github-token : ${{ needs.find_valid_pat.outputs.pat }}
163
+ github-token : ${{ env.PAT }}
164
164
label : ${{ needs.start-gke-kube-acceptance-test-runner.outputs.label }}
165
165
ec2-instance-id : ${{ needs.start-gke-kube-acceptance-test-runner.outputs.ec2-instance-id }}
0 commit comments