@@ -25,10 +25,19 @@ permissions:
2525
2626jobs :
2727 start-workflow :
28- name : Append 'Starting' Comment
28+ name : Start Workflow
2929 runs-on : ubuntu-latest
3030 steps :
3131
32+ - name : Authenticate as GitHub App
33+ uses : actions/create-github-app-token@v1
34+ id : get-app-token
35+ with :
36+ owner : " airbytehq"
37+ repositories : " PyAirbyte"
38+ app-id : ${{ secrets.OCTAVIA_BOT_APP_ID }}
39+ private-key : ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }}
40+
3241 - name : Create URL to the run output
3342 id : vars
3443 run : echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_OUTPUT
@@ -49,12 +58,14 @@ jobs:
4958 uses : cloudposse-github-actions/get-pr@v2.0.0
5059 with :
5160 id : ${{ inputs.pr }}
61+
5262 outputs :
5363 source-repo : ${{ fromJSON(steps.pr-info.outputs.json).head.repo.full_name }}
5464 source-branch : ${{ fromJSON(steps.pr-info.outputs.json).head.ref }}
5565 commit-sha : ${{ fromJSON(steps.pr-info.outputs.json).head.sha }}
5666 pr-number : ${{ steps.pr-info.outputs.number }}
5767 pr-title : ${{ steps.pr-info.outputs.title }}
68+ gh-app-token : ${{ steps.get-app-token.outputs.token }}
5869
5970 # This is copied from the `python_pytest.yml` file.
6071 # Only the first two steps of the job are different, and they check out the PR's branch.
98109 repo : " airbytehq/airbyte" # Post to the Airbyte repo, not the fork
99110 sha : ${{ needs.start-workflow.outputs.commit-sha }}
100111 status : in_progress
101- token : ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}
112+ token : ${{ needs.start-workflow.outputs.gh-app-token }}
102113
103114 # Same as the `python_pytest.yml` file:
104115
@@ -147,7 +158,7 @@ jobs:
147158 sha : ${{ needs.start-workflow.outputs.commit-sha }}
148159 status : completed
149160 conclusion : ${{ job.status }}
150- token : ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}
161+ token : ${{ needs.start-workflow.outputs.gh-app-token }}
151162
152163 log-success-comment :
153164 name : Append 'Success' Comment
0 commit comments