Skip to content

Commit d4bfcf3

Browse files
introduce new pattern of GH PAT usage for #2641 (#22177)
1 parent bc7ebee commit d4bfcf3

20 files changed

+79
-218
lines changed

.github/workflows/approve-and-merge-dispatch.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,11 @@ jobs:
66
approveAndMergeDispatch:
77
runs-on: ubuntu-latest
88
steps:
9-
- name: Checkout Airbyte
10-
uses: actions/checkout@v3
11-
- name: Check PAT rate limits
12-
run: |
13-
./tools/bin/find_non_rate_limited_PAT \
14-
${{ secrets.AIRBYTEIO_PAT }} \
15-
${{ secrets.OCTAVIA_GITHUB_RUNNER_TOKEN }} \
16-
${{ secrets.SUPERTOPHER_PAT }}
17-
189
- name: Auto Approve Slash Command Dispatch
1910
uses: peter-evans/slash-command-dispatch@v3
2011
id: scd
2112
with:
22-
token: ${{ env.PAT }}
13+
token: ${{ secrets.GH_PAT_APPROVINGTON_OCTAVIA }}
2314
permission: write
2415
issue-type: pull-request
2516
repository: airbytehq/airbyte-cloud

.github/workflows/commands-for-testing-tool.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,6 @@ jobs:
1313
comment-id: ${{ steps.comment-info.outputs.comment-id }}
1414
command: ${{ steps.regex.outputs.first_match }}
1515
steps:
16-
- name: Checkout Airbyte
17-
uses: actions/checkout@v3
18-
- name: Check PAT rate limits
19-
run: |
20-
./tools/bin/find_non_rate_limited_PAT \
21-
${{ secrets.AIRBYTEIO_PAT }} \
22-
${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \
23-
${{ secrets.SUPERTOPHER_PAT }} \
24-
${{ secrets.DAVINCHIA_PAT }}
2516
- name: Get PR repo and ref
2617
id: getref
2718
run: |

.github/workflows/connector_integration_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Launch Integration Tests
2929
run: python ./tools/bin/ci_integration_workflow_launcher.py base-normalization source-acceptance-test source:beta source:GA destination:beta destination:GA
3030
env:
31-
GITHUB_TOKEN: ${{ secrets.SLASH_COMMAND_PAT }}
31+
GITHUB_TOKEN: ${{ secrets.GH_PAT_MAINTENANCE_OSS }}
3232
launch_integration_tests_alpha_only:
3333
runs-on: ubuntu-latest
3434
if: github.ref == 'refs/heads/master'
@@ -47,4 +47,4 @@ jobs:
4747
- name: Launch Integration Tests (Alpha connectors)
4848
run: python ./tools/bin/ci_integration_workflow_launcher.py source:alpha destination:alpha
4949
env:
50-
GITHUB_TOKEN: ${{ secrets.SLASH_COMMAND_PAT }}
50+
GITHUB_TOKEN: ${{ secrets.GH_PAT_MAINTENANCE_OSS }}

.github/workflows/deploy-oss-catalog.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,9 @@ jobs:
3636
gcs_bucket_name="prod-airbyte-cloud-connector-metadata-service"
3737
catalog_path="airbyte-config/init/src/main/resources/seed/oss_catalog.json"
3838
gsutil -h "Cache-Control:public, max-age=10" cp "$catalog_path" "gs://$gcs_bucket_name/oss_catalog.json"
39-
- name: Check PAT rate limits
40-
run: |
41-
./tools/bin/find_non_rate_limited_PAT \
42-
${{ secrets.OCTAVIA_4_ROOT_ACCESS }} \
43-
${{ secrets.OCTAVIA_PAT }}
4439
- name: Trigger Cloud catalog generation
4540
uses: peter-evans/repository-dispatch@v2
4641
with:
47-
token: ${{ env.PAT }}
42+
token: ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}
4843
repository: airbytehq/airbyte-cloud
4944
event-type: generate-cloud-catalog

.github/workflows/gke-kube-test-command.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ jobs:
3333
- name: Check PAT rate limits
3434
run: |
3535
./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 }}
36+
${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \
37+
${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }}
4038
- name: Start AWS Runner
4139
id: start-ec2-runner
4240
uses: ./.github/actions/start-aws-runner
@@ -152,10 +150,8 @@ jobs:
152150
- name: Check PAT rate limits
153151
run: |
154152
./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 }}
153+
${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \
154+
${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }}
159155
- name: Stop EC2 runner
160156
uses: supertopher/[email protected]
161157
with:

.github/workflows/gradle.yml

Lines changed: 24 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ jobs:
124124
- uses: actions/setup-python@v4
125125
with:
126126
python-version: "3.9"
127-
token: ${{ env.PAT }}
128127

129128
- name: Set up CI Gradle Properties
130129
run: |
@@ -191,10 +190,8 @@ jobs:
191190
- name: Check PAT rate limits
192191
run: |
193192
./tools/bin/find_non_rate_limited_PAT \
194-
${{ secrets.AIRBYTEIO_PAT }} \
195-
${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \
196-
${{ secrets.SUPERTOPHER_PAT }} \
197-
${{ secrets.DAVINCHIA_PAT }}
193+
${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \
194+
${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }}
198195
- name: Start AWS Runner
199196
id: start-ec2-runner
200197
uses: ./.github/actions/start-aws-runner
@@ -230,7 +227,6 @@ jobs:
230227
- uses: actions/setup-python@v4
231228
with:
232229
python-version: "3.9"
233-
token: ${{ env.PAT }}
234230

235231
- name: Install Pyenv
236232
run: python3 -m pip install virtualenv==16.7.9 --user
@@ -345,10 +341,8 @@ jobs:
345341
- name: Check PAT rate limits
346342
run: |
347343
./tools/bin/find_non_rate_limited_PAT \
348-
${{ secrets.AIRBYTEIO_PAT }} \
349-
${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \
350-
${{ secrets.SUPERTOPHER_PAT }} \
351-
${{ secrets.DAVINCHIA_PAT }}
344+
${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \
345+
${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }}
352346
- name: Stop EC2 runner
353347
uses: supertopher/[email protected]
354348
with:
@@ -378,10 +372,8 @@ jobs:
378372
- name: Check PAT rate limits
379373
run: |
380374
./tools/bin/find_non_rate_limited_PAT \
381-
${{ secrets.AIRBYTEIO_PAT }} \
382-
${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \
383-
${{ secrets.SUPERTOPHER_PAT }} \
384-
${{ secrets.DAVINCHIA_PAT }}
375+
${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \
376+
${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }}
385377
- name: Start AWS Runner
386378
id: start-ec2-runner
387379
uses: ./.github/actions/start-aws-runner
@@ -416,7 +408,6 @@ jobs:
416408
- uses: actions/setup-python@v4
417409
with:
418410
python-version: "3.9"
419-
token: ${{ env.PAT }}
420411

421412
- name: Set up CI Gradle Properties
422413
run: |
@@ -471,10 +462,8 @@ jobs:
471462
- name: Check PAT rate limits
472463
run: |
473464
./tools/bin/find_non_rate_limited_PAT \
474-
${{ secrets.AIRBYTEIO_PAT }} \
475-
${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \
476-
${{ secrets.SUPERTOPHER_PAT }} \
477-
${{ secrets.DAVINCHIA_PAT }}
465+
${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \
466+
${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }}
478467
- name: Stop EC2 runner
479468
uses: supertopher/[email protected]
480469
with:
@@ -504,10 +493,8 @@ jobs:
504493
- name: Check PAT rate limits
505494
run: |
506495
./tools/bin/find_non_rate_limited_PAT \
507-
${{ secrets.AIRBYTEIO_PAT }} \
508-
${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \
509-
${{ secrets.SUPERTOPHER_PAT }} \
510-
${{ secrets.DAVINCHIA_PAT }}
496+
${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \
497+
${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }}
511498
- name: Start AWS Runner
512499
id: start-ec2-runner
513500
uses: ./.github/actions/start-aws-runner
@@ -540,7 +527,6 @@ jobs:
540527
- uses: actions/setup-python@v4
541528
with:
542529
python-version: "3.9"
543-
token: ${{ env.PAT }}
544530

545531
- name: Delete default old docker and replace it with a new one
546532
shell: bash
@@ -600,10 +586,8 @@ jobs:
600586
- name: Check PAT rate limits
601587
run: |
602588
./tools/bin/find_non_rate_limited_PAT \
603-
${{ secrets.AIRBYTEIO_PAT }} \
604-
${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \
605-
${{ secrets.SUPERTOPHER_PAT }} \
606-
${{ secrets.DAVINCHIA_PAT }}
589+
${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \
590+
${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }}
607591
- name: Stop EC2 runner
608592
uses: supertopher/[email protected]
609593
with:
@@ -633,10 +617,8 @@ jobs:
633617
- name: Check PAT rate limits
634618
run: |
635619
./tools/bin/find_non_rate_limited_PAT \
636-
${{ secrets.AIRBYTEIO_PAT }} \
637-
${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \
638-
${{ secrets.SUPERTOPHER_PAT }} \
639-
${{ secrets.DAVINCHIA_PAT }}
620+
${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \
621+
${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }}
640622
- name: Start AWS Runner
641623
id: start-ec2-runner
642624
uses: ./.github/actions/start-aws-runner
@@ -668,7 +650,6 @@ jobs:
668650
- uses: actions/setup-python@v4
669651
with:
670652
python-version: "3.9"
671-
token: ${{ env.PAT }}
672653

673654
- uses: actions/setup-node@v3
674655
with:
@@ -803,7 +784,6 @@ jobs:
803784
if: always()
804785
with:
805786
python-version: "3.9"
806-
token: ${{ env.PAT }}
807787

808788
- name: Publish Platform Test Results
809789
uses: EnricoMi/publish-unit-test-result-action@v2
@@ -879,10 +859,8 @@ jobs:
879859
- name: Check PAT rate limits
880860
run: |
881861
./tools/bin/find_non_rate_limited_PAT \
882-
${{ secrets.AIRBYTEIO_PAT }} \
883-
${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \
884-
${{ secrets.SUPERTOPHER_PAT }} \
885-
${{ secrets.DAVINCHIA_PAT }}
862+
${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \
863+
${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }}
886864
- name: Stop EC2 runner
887865
uses: supertopher/[email protected]
888866
with:
@@ -911,10 +889,8 @@ jobs:
911889
- name: Check PAT rate limits
912890
run: |
913891
./tools/bin/find_non_rate_limited_PAT \
914-
${{ secrets.AIRBYTEIO_PAT }} \
915-
${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \
916-
${{ secrets.SUPERTOPHER_PAT }} \
917-
${{ secrets.DAVINCHIA_PAT }}
892+
${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \
893+
${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }}
918894
- name: Start AWS Runner
919895
id: start-ec2-runner
920896
uses: ./.github/actions/start-aws-runner
@@ -949,7 +925,6 @@ jobs:
949925
- uses: actions/setup-python@v4
950926
with:
951927
python-version: "3.9"
952-
token: ${{ env.PAT }}
953928

954929
- name: Install unzip
955930
shell: bash
@@ -1026,7 +1001,6 @@ jobs:
10261001
if: always()
10271002
with:
10281003
python-version: "3.9"
1029-
token: ${{ env.PAT }}
10301004

10311005
- name: Publish Kube Test Results
10321006
id: kube-results
@@ -1107,10 +1081,8 @@ jobs:
11071081
- name: Check PAT rate limits
11081082
run: |
11091083
./tools/bin/find_non_rate_limited_PAT \
1110-
${{ secrets.AIRBYTEIO_PAT }} \
1111-
${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \
1112-
${{ secrets.SUPERTOPHER_PAT }} \
1113-
${{ secrets.DAVINCHIA_PAT }}
1084+
${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \
1085+
${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }}
11141086
- name: Stop EC2 runner
11151087
uses: supertopher/[email protected]
11161088
with:
@@ -1139,10 +1111,8 @@ jobs:
11391111
- name: Check PAT rate limits
11401112
run: |
11411113
./tools/bin/find_non_rate_limited_PAT \
1142-
${{ secrets.AIRBYTEIO_PAT }} \
1143-
${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \
1144-
${{ secrets.SUPERTOPHER_PAT }} \
1145-
${{ secrets.DAVINCHIA_PAT }}
1114+
${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \
1115+
${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }}
11461116
- name: Start AWS Runner
11471117
id: start-ec2-runner
11481118
uses: ./.github/actions/start-aws-runner
@@ -1197,7 +1167,6 @@ jobs:
11971167
- uses: actions/setup-python@v4
11981168
with:
11991169
python-version: "3.9"
1200-
token: ${{ env.PAT }}
12011170

12021171
- uses: actions/setup-java@v1
12031172
with:
@@ -1342,10 +1311,8 @@ jobs:
13421311
- name: Check PAT rate limits
13431312
run: |
13441313
./tools/bin/find_non_rate_limited_PAT \
1345-
${{ secrets.AIRBYTEIO_PAT }} \
1346-
${{ secrets.OSS_BUILD_RUNNER_GITHUB_PAT }} \
1347-
${{ secrets.SUPERTOPHER_PAT }} \
1348-
${{ secrets.DAVINCHIA_PAT }}
1314+
${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \
1315+
${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }}
13491316
- name: Stop EC2 runner
13501317
uses: supertopher/[email protected]
13511318
with:

.github/workflows/label-github-issues-by-context.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,12 @@ jobs:
88
name: "Add Labels to Issues. Safe to Merge on fail"
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: Checkout Airbyte Repo for PAT command
12-
uses: actions/checkout@v3
13-
- name: Check PAT rate limits
14-
# Cannot share PAT outside of JOB context
15-
run: |
16-
./tools/bin/find_non_rate_limited_PAT \
17-
${{ secrets.OCTAVIA_4_ROOT_ACCESS }} \
18-
${{ secrets.OCTAVIA_PAT }}
1911
- name: Run Issue Command from workflow-actions
2012
uses: nick-fields/private-action-loader@v3
2113
with:
22-
pal-repo-token: "${{ env.PAT }}"
14+
pal-repo-token: "${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}"
2315
pal-repo-name: airbytehq/workflow-actions@production
2416
# the following input gets passed to the private
25-
token: "${{ env.PAT }}"
17+
token: "${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}"
2618
# ref: https://github.com/airbytehq/workflow-actions/blob/main/src/bin_issue.ts
2719
command: "issue"

.github/workflows/label-github-issues-by-path.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,8 @@ jobs:
1010
name: "Label PRs based on files changes"
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Checkout Airbyte Repo for PAT command
14-
uses: actions/checkout@v2
15-
- name: Check PAT rate limits
16-
# Cannot share PAT outside of JOB context
17-
run: |
18-
./tools/bin/find_non_rate_limited_PAT \
19-
${{ secrets.OCTAVIA_4_ROOT_ACCESS }} \
20-
${{ secrets.OCTAVIA_PAT }}
2113
- name: "Label PR based on changed files"
2214
uses: actions/labeler@v3
2315
with:
24-
repo-token: "${{ env.PAT }}"
16+
repo-token: "${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}"
2517
sync-labels: true

.github/workflows/label-prs-by-context.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,11 @@ jobs:
1010
name: "Add Labels to PRs. Safe to Merge on fail"
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Checkout Airbyte Repo for PAT command
14-
uses: actions/checkout@v3
15-
- name: Check PAT rate limits
16-
# Cannot share PAT outside of JOB context
17-
run: |
18-
./tools/bin/find_non_rate_limited_PAT \
19-
${{ secrets.OCTAVIA_4_ROOT_ACCESS }} \
20-
${{ secrets.OCTAVIA_PAT }}
2113
- name: Run Issue Command from workflow-actions
2214
uses: nick-fields/private-action-loader@v3
2315
with:
24-
pal-repo-token: "${{ env.PAT }}"
16+
pal-repo-token: "${{ GH_PAT_MAINTENANCE_OCTAVIA }}"
2517
pal-repo-name: airbytehq/workflow-actions@production
2618
# the following input gets passed to the private action
27-
token: "${{ env.PAT }}"
19+
token: "${{ GH_PAT_MAINTENANCE_OCTAVIA }}"
2820
command: "pull"

0 commit comments

Comments
 (0)