@@ -81,16 +81,22 @@ jobs:
8181 - name : Authenticate as GitHub App
8282 uses : actions/create-github-app-token@v3
8383 id : app-token
84+ continue-on-error : ${{ github.actor == 'dependabot[bot]' }}
8485 with :
8586 app-id : ${{ secrets.OCTAVIA_BOT_APP_ID }}
8687 private-key : ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }}
8788
89+ - name : Warn on GitHub App auth fallback
90+ if : steps.app-token.outcome == 'failure'
91+ run : |
92+ echo "::warning::GitHub App authentication failed (secrets may not be available in this context). Falling back to GITHUB_TOKEN."
93+
8894 - name : Post or append starting comment
8995 if : ${{ !inputs.dry_run && github.event.inputs.pr != '' }}
9096 id : start-comment
9197 uses : peter-evans/create-or-update-comment@v5
9298 with :
93- token : ${{ steps.app-token.outputs.token }}
99+ token : ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
94100 issue-number : ${{ github.event.inputs.pr }}
95101 comment-id : ${{ github.event.inputs.comment-id || '' }}
96102 body : |
@@ -104,7 +110,7 @@ jobs:
104110 if : ${{ !inputs.dry_run && github.event.inputs.pr != '' }}
105111 id : pr-branch
106112 env :
107- GH_TOKEN : ${{ steps.app-token.outputs.token }}
113+ GH_TOKEN : ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
108114 PR_NUMBER : ${{ github.event.inputs.pr }}
109115 run : |
110116 PR_JSON=$(gh api repos/${{ github.repository }}/pulls/${PR_NUMBER})
@@ -121,7 +127,7 @@ jobs:
121127 with :
122128 fetch-depth : 0
123129 ref : ${{ steps.pr-branch.outputs.head_ref || '' }}
124- token : ${{ steps.app-token.outputs.token }}
130+ token : ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
125131
126132 - name : Install uv
127133 uses : astral-sh/setup-uv@v5
@@ -229,7 +235,7 @@ jobs:
229235 id : create-pr
230236 uses : peter-evans/create-pull-request@v6
231237 with :
232- token : ${{ steps.app-token.outputs.token }}
238+ token : ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
233239 commit-message : " chore: regenerate SDK with Speakeasy"
234240 title : " chore: regenerate SDK with Speakeasy"
235241 body : |
@@ -246,14 +252,14 @@ jobs:
246252 || github.event_name == 'schedule'
247253 ) && steps.create-pr.outputs.pull-request-operation == 'created'
248254 env :
249- GH_TOKEN : ${{ steps.app-token.outputs.token }}
255+ GH_TOKEN : ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
250256 run : gh pr merge ${{ steps.create-pr.outputs.pull-request-number }} --auto --squash
251257
252258 - name : Append success comment
253259 if : ${{ success() && !inputs.dry_run && github.event.inputs.pr != '' }}
254260 uses : peter-evans/create-or-update-comment@v5
255261 with :
256- token : ${{ steps.app-token.outputs.token }}
262+ token : ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
257263 comment-id : ${{ steps.start-comment.outputs.comment-id }}
258264 reactions : hooray
259265 body : |
@@ -263,7 +269,7 @@ jobs:
263269 if : ${{ failure() && !inputs.dry_run && github.event.inputs.pr != '' }}
264270 uses : peter-evans/create-or-update-comment@v5
265271 with :
266- token : ${{ steps.app-token.outputs.token }}
272+ token : ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
267273 comment-id : ${{ steps.start-comment.outputs.comment-id }}
268274 reactions : confused
269275 body : |
0 commit comments