Skip to content

Commit 1b2883d

Browse files
Add Octavia Bot auth for submodule checkout in pytest workflows
- Add GitHub App authentication to all pytest jobs - Configure checkout to use Octavia Bot token with access to sonar repo - Enable recursive submodule checkout - This allows CI to clone the private sonar submodule for connector-sdk Co-Authored-By: AJ Steers <aj@airbyte.io>
1 parent c85fae9 commit 1b2883d

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/python_pytest.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,19 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
# Common steps:
28+
- name: Authenticate as GitHub App
29+
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
30+
id: get-app-token
31+
with:
32+
owner: "airbytehq"
33+
repositories: "PyAirbyte,sonar"
34+
app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }}
35+
private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }}
2836
- name: Checkout code
2937
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
38+
with:
39+
token: ${{ steps.get-app-token.outputs.token }}
40+
submodules: recursive
3041
- name: Set up Poetry
3142
uses: Gr1N/setup-poetry@48b0f77c8c1b1b19cb962f0f00dff7b4be8f81ec # v9
3243
with:
@@ -90,8 +101,19 @@ jobs:
90101
runs-on: ubuntu-latest
91102
steps:
92103
# Common steps:
104+
- name: Authenticate as GitHub App
105+
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
106+
id: get-app-token
107+
with:
108+
owner: "airbytehq"
109+
repositories: "PyAirbyte,sonar"
110+
app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }}
111+
private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }}
93112
- name: Checkout code
94113
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
114+
with:
115+
token: ${{ steps.get-app-token.outputs.token }}
116+
submodules: recursive
95117
- name: Set up Poetry
96118
uses: Gr1N/setup-poetry@48b0f77c8c1b1b19cb962f0f00dff7b4be8f81ec # v9
97119
with:
@@ -168,8 +190,19 @@ jobs:
168190
PYTHONIOENCODING: utf-8
169191
steps:
170192
# Common steps:
193+
- name: Authenticate as GitHub App
194+
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
195+
id: get-app-token
196+
with:
197+
owner: "airbytehq"
198+
repositories: "PyAirbyte,sonar"
199+
app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }}
200+
private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }}
171201
- name: Checkout code
172202
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
203+
with:
204+
token: ${{ steps.get-app-token.outputs.token }}
205+
submodules: recursive
173206
- name: Set up Python
174207
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
175208
with:
@@ -241,8 +274,19 @@ jobs:
241274
name: Dependency Analysis with Deptry
242275
runs-on: ubuntu-latest
243276
steps:
277+
- name: Authenticate as GitHub App
278+
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
279+
id: get-app-token
280+
with:
281+
owner: "airbytehq"
282+
repositories: "PyAirbyte,sonar"
283+
app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }}
284+
private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }}
244285
- name: Checkout code
245286
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
287+
with:
288+
token: ${{ steps.get-app-token.outputs.token }}
289+
submodules: recursive
246290
- name: Set up Python
247291
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
248292
with:

0 commit comments

Comments
 (0)