Skip to content

Commit 930434c

Browse files
Add Octavia Bot auth and submodule checkout to all workflows
- Add GitHub App authentication to all jobs that run poetry install - Configure checkout to use Octavia Bot token with access to sonar repo - Enable recursive submodule checkout in all workflows - Update repositories list to include both PyAirbyte and sonar - This allows CI to clone the private sonar submodule for connector-sdk Updated workflows: - python_lint.yml (3 jobs) - pydoc_preview.yml - pydoc_publish.yml - autofix.yml - test-pr-command.yml - fix-pr-command.yml Co-Authored-By: AJ Steers <aj@airbyte.io>
1 parent 1b2883d commit 930434c

File tree

6 files changed

+70
-2
lines changed

6 files changed

+70
-2
lines changed

.github/workflows/autofix.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,19 @@ jobs:
1212
python-autofix:
1313
runs-on: ubuntu-latest
1414
steps:
15+
- name: Authenticate as GitHub App
16+
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
17+
id: get-app-token
18+
with:
19+
owner: "airbytehq"
20+
repositories: "PyAirbyte,sonar"
21+
app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }}
22+
private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }}
1523
- name: Checkout code
1624
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
25+
with:
26+
token: ${{ steps.get-app-token.outputs.token }}
27+
submodules: recursive
1728
- name: Set up Python
1829
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
1930
with:

.github/workflows/fix-pr-command.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
id: get-app-token
4141
with:
4242
owner: "airbytehq"
43-
repositories: "PyAirbyte"
43+
repositories: "PyAirbyte,sonar"
4444
app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }}
4545
private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }}
4646
- name: Checkout Airbyte
@@ -49,6 +49,7 @@ jobs:
4949
# Important that this is set so that CI checks are triggered again
5050
# Without this we would be forever waiting on required checks to pass
5151
token: ${{ steps.get-app-token.outputs.token }}
52+
submodules: recursive
5253

5354
- name: Checkout PR (${{ github.event.inputs.pr }})
5455
uses: dawidd6/action-checkout-pr@a7598e18433a763b784f17d666372913d8bd4205 # v1.2.0

.github/workflows/pydoc_preview.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,19 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17+
- name: Authenticate as GitHub App
18+
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
19+
id: get-app-token
20+
with:
21+
owner: "airbytehq"
22+
repositories: "PyAirbyte,sonar"
23+
app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }}
24+
private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }}
1725
- name: Checkout code
1826
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
27+
with:
28+
token: ${{ steps.get-app-token.outputs.token }}
29+
submodules: recursive
1930
- name: Set up Python
2031
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
2132
with:

.github/workflows/pydoc_publish.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,19 @@ jobs:
3131
url: ${{ steps.deployment.outputs.page_url }}
3232

3333
steps:
34+
- name: Authenticate as GitHub App
35+
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
36+
id: get-app-token
37+
with:
38+
owner: "airbytehq"
39+
repositories: "PyAirbyte,sonar"
40+
app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }}
41+
private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }}
3442
- name: Checkout code
3543
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
44+
with:
45+
token: ${{ steps.get-app-token.outputs.token }}
46+
submodules: recursive
3647
- name: Set up Python
3748
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
3849
with:

.github/workflows/python_lint.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,19 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
# Common steps:
20+
- name: Authenticate as GitHub App
21+
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
22+
id: get-app-token
23+
with:
24+
owner: "airbytehq"
25+
repositories: "PyAirbyte,sonar"
26+
app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }}
27+
private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }}
2028
- name: Checkout code
2129
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
30+
with:
31+
token: ${{ steps.get-app-token.outputs.token }}
32+
submodules: recursive
2233
- name: Set up Poetry
2334
uses: Gr1N/setup-poetry@48b0f77c8c1b1b19cb962f0f00dff7b4be8f81ec # v9
2435
with:
@@ -43,8 +54,19 @@ jobs:
4354
runs-on: ubuntu-latest
4455
steps:
4556
# Common steps:
57+
- name: Authenticate as GitHub App
58+
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
59+
id: get-app-token
60+
with:
61+
owner: "airbytehq"
62+
repositories: "PyAirbyte,sonar"
63+
app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }}
64+
private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }}
4665
- name: Checkout code
4766
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
67+
with:
68+
token: ${{ steps.get-app-token.outputs.token }}
69+
submodules: recursive
4870
- name: Set up Python
4971
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
5072
with:
@@ -65,8 +87,19 @@ jobs:
6587
runs-on: ubuntu-latest
6688
steps:
6789
# Common steps:
90+
- name: Authenticate as GitHub App
91+
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
92+
id: get-app-token
93+
with:
94+
owner: "airbytehq"
95+
repositories: "PyAirbyte,sonar"
96+
app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }}
97+
private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }}
6898
- name: Checkout code
6999
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
100+
with:
101+
token: ${{ steps.get-app-token.outputs.token }}
102+
submodules: recursive
70103
- name: Set up Poetry
71104
uses: Gr1N/setup-poetry@48b0f77c8c1b1b19cb962f0f00dff7b4be8f81ec # v9
72105
with:

.github/workflows/test-pr-command.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
id: get-app-token
8282
with:
8383
owner: "airbytehq"
84-
repositories: "PyAirbyte"
84+
repositories: "PyAirbyte,sonar"
8585
app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }}
8686
private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }}
8787

@@ -90,6 +90,7 @@ jobs:
9090
with:
9191
token: ${{ secrets.GITHUB_TOKEN }}
9292
ref: ${{ needs.start-workflow.outputs.commit-sha }}
93+
submodules: recursive
9394

9495
# Post "In Progress" status to the PR.
9596
# This is required because otherwise slash commands won't automatically

0 commit comments

Comments
 (0)