Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/workflows/fix-dependabot-alerts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -431,10 +431,25 @@ jobs:
echo "shell_ok=true" >> "$GITHUB_OUTPUT"

# ── Create PR ───────────────────────────────────────────────────
# GitHub App installation tokens expire after 1 hour. The build/verify
# phase routinely runs longer than that, so the original app-token
# minted at job start is expired by the time we get here, causing
# `gh pr create` to fail with 401 Bad credentials (the `git push`
# itself works because actions/checkout uses the workflow's own
# GITHUB_TOKEN, which is valid for the full job lifetime). Mint a
# fresh app token immediately before any late-running `gh` calls.
- name: Refresh GitHub App token
id: app-token-pr
if: ${{ steps.fix.outputs.changes == 'true' && steps.build.outputs.build_ok == 'true' }}
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.DEPENDABOT_APP_ID }}
private-key: ${{ secrets.DEPENDABOT_APP_PRIVATE_KEY }}

- name: Create pull request
if: ${{ steps.fix.outputs.changes == 'true' && steps.build.outputs.build_ok == 'true' }}
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
GH_TOKEN: ${{ steps.app-token-pr.outputs.token }}
run: |
BRANCH="automated/fix-dependabot-alerts-$(date +%Y%m%d)-${{ github.run_number }}"

Expand Down
Loading