Skip to content

Commit 66ddb61

Browse files
fix: use continue-on-error for GitHub App auth instead of secrets check in if
The secrets context is not available during workflow_dispatch parsing, causing a 422 error when triggering via API. Use continue-on-error on the auth step and fall back to GITHUB_TOKEN in the token step. Co-Authored-By: AJ Steers <aj@airbyte.io>
1 parent 9dd02c2 commit 66ddb61

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/generate-command.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@ jobs:
6666
pull-requests: write
6767
steps:
6868
- name: Authenticate as GitHub App
69-
if: ${{ !inputs.dry_run && github.event.inputs.pr != '' && secrets.OCTAVIA_BOT_APP_ID != '' }}
69+
if: ${{ !inputs.dry_run && github.event.inputs.pr != '' }}
7070
uses: actions/create-github-app-token@v3
7171
id: get-app-token
72+
continue-on-error: true
7273
with:
7374
app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }}
7475
private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }}
@@ -77,9 +78,9 @@ jobs:
7778
id: token
7879
run: |
7980
if [ -n "${{ steps.get-app-token.outputs.token }}" ]; then
80-
echo "token=${{ steps.get-app-token.outputs.token }}" >> $GITHUB_OUTPUT
81+
echo "token=${{ steps.get-app-token.outputs.token }}" | tee -a $GITHUB_OUTPUT
8182
else
82-
echo "token=${{ github.token }}" >> $GITHUB_OUTPUT
83+
echo "token=${{ github.token }}" | tee -a $GITHUB_OUTPUT
8384
fi
8485
8586
- name: Post or append starting comment

0 commit comments

Comments
 (0)