diff --git a/.github/workflows/fix-pr-command.yml b/.github/workflows/fix-pr-command.yml index cd3f71b1..f6db22d8 100644 --- a/.github/workflows/fix-pr-command.yml +++ b/.github/workflows/fix-pr-command.yml @@ -35,12 +35,20 @@ jobs: steps: # Custom steps to fetch the PR and checkout the code: + - name: Authenticate as GitHub App + uses: actions/create-github-app-token@v2 + id: get-app-token + with: + owner: "airbytehq" + repositories: "PyAirbyte" + app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }} + private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }} - name: Checkout Airbyte uses: actions/checkout@v4 with: # Important that this is set so that CI checks are triggered again # Without this we would be forever waiting on required checks to pass - token: ${{ secrets.GH_PAT_APPROVINGTON_OCTAVIA }} + token: ${{ steps.get-app-token.outputs.token }} - name: Checkout PR (${{ github.event.inputs.pr }}) uses: dawidd6/action-checkout-pr@v1 diff --git a/.github/workflows/poetry-lock-command.yml b/.github/workflows/poetry-lock-command.yml index 6d95398f..fc128061 100644 --- a/.github/workflows/poetry-lock-command.yml +++ b/.github/workflows/poetry-lock-command.yml @@ -32,12 +32,20 @@ jobs: steps: # Custom steps to fetch the PR and checkout the code: + - name: Authenticate as GitHub App + uses: actions/create-github-app-token@v2 + id: get-app-token + with: + owner: "airbytehq" + repositories: "PyAirbyte" + app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }} + private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }} - name: Checkout Airbyte uses: actions/checkout@v4 with: # Important that this is set so that CI checks are triggered again # Without this we would be forever waiting on required checks to pass - token: ${{ secrets.GH_PAT_APPROVINGTON_OCTAVIA }} + token: ${{ steps.get-app-token.outputs.token }} - name: Checkout PR (${{ github.event.inputs.pr }}) uses: dawidd6/action-checkout-pr@v1 diff --git a/.github/workflows/slash_command_dispatch.yml b/.github/workflows/slash_command_dispatch.yml index 25c92ad5..f55e0de6 100644 --- a/.github/workflows/slash_command_dispatch.yml +++ b/.github/workflows/slash_command_dispatch.yml @@ -14,12 +14,20 @@ jobs: runs-on: ubuntu-latest steps: + - name: Authenticate as GitHub App + uses: actions/create-github-app-token@v2 + id: get-app-token + with: + owner: "airbytehq" + repositories: "PyAirbyte" + app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }} + private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }} - name: Slash Command Dispatch id: dispatch uses: peter-evans/slash-command-dispatch@v4 with: repository: ${{ github.repository }} - token: ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }} + token: ${{ steps.get-app-token.outputs.token }} dispatch-type: workflow issue-type: pull-request commands: |