Skip to content

ci(github): use app token for dependabot merges#35

Merged
ncipollina merged 1 commit into
mainfrom
ci/dependabot-app-token
Jul 22, 2026
Merged

ci(github): use app token for dependabot merges#35
ncipollina merged 1 commit into
mainfrom
ci/dependabot-app-token

Conversation

@ncipollina

Copy link
Copy Markdown
Collaborator

Summary

Updates the Dependabot auto-merge workflow to use the repository GitHub App token for approval and auto-merge actions instead of GITHUB_TOKEN. This keeps downstream workflows from being suppressed after Dependabot auto-merges.

Changes

  • Adds a SHA-pinned actions/create-github-app-token step using DEPENDABOT_AUTOMERGE_APP_ID and DEPENDABOT_AUTOMERGE_PRIVATE_KEY.
  • Keeps dependabot/fetch-metadata on secrets.GITHUB_TOKEN.
  • Uses the generated app token for gh pr review --approve and gh pr merge --auto --squash.
  • References the hyphenated app-token step ID with bracket notation.

Validation

  • Workflow-only change; reviewed YAML and GitHub Actions expression syntax.

@github-actions github-actions Bot added the type: ci CI/CD changes label Jul 22, 2026
@ncipollina
ncipollina merged commit 004e251 into main Jul 22, 2026
4 checks passed
@ncipollina
ncipollina deleted the ci/dependabot-app-token branch July 22, 2026 19:34

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a1a6e39934

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +27 to +28
app-id: ${{ secrets.DEPENDABOT_AUTOMERGE_APP_ID }}
private-key: ${{ secrets.DEPENDABOT_AUTOMERGE_PRIVATE_KEY }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Move app credentials off this Dependabot trigger

For Dependabot PRs this job always runs under pull_request_target with github.event.pull_request.user.login == 'dependabot[bot]'; GitHub documents that in that context the workflow receives a read-only token and secrets are unavailable (see GitHub Docs: Dependabot on Actions). These secrets.* values are therefore empty for the only runs that reach this step, so actions/create-github-app-token cannot mint the token and the patch/minor auto-merge path stops before approval/merge. Use a trigger that can access the app credentials, such as a follow-up privileged workflow, or another supported credential source for Dependabot runs.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: ci CI/CD changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant