Skip to content

Cut releases for auto-merged Dependabot PRs - #123

Merged
drache42 merged 2 commits into
mainfrom
fix/automerge-app-token
Aug 29, 2026
Merged

Cut releases for auto-merged Dependabot PRs#123
drache42 merged 2 commits into
mainfrom
fix/automerge-app-token

Conversation

@drache42

Copy link
Copy Markdown
Owner

What & why

automerge.yml enabled GitHub auto-merge with secrets.GITHUB_TOKEN, so the eventual merge landed as github-actions[bot]. GitHub does not start a new workflow run from a push produced with the default GITHUB_TOKEN, so main.yml (on: push: branches: [main]) never fired after an auto-merge — no compute-version, no release, no ghcr.io publish. main.yml last ran 2026-08-04 (human merge #116); auto-merged #117 and #120 produced no run; v1.3.4 has been frozen since.

Fixes #122.

The fix

Enable auto-merge with a short-lived token minted from the froefam-automerge GitHub App (actions/create-github-app-token, SHA-pinned to v3.2.0) instead of GITHUB_TOKEN. The merge is then attributed to the App and the push to main triggers main.yml like a human merge. No changes to main.yml.

Also:

  • Drops the workflow GITHUB_TOKEN permissions to read-only (the write identity is now the app token).
  • Job if: requires github.actor == 'dependabot[bot]' as well as the PR author, so a human pushing a fixup to a Dependabot branch (a human-actor run, which cannot read the Dependabot secret store) skips cleanly instead of erroring.
  • Pins the minted token to contents: write + pull-requests: write only.
  • Adds a run-summary diagnostic on failure (automerge.yml previously had no failure signal).

Prerequisites (already done)

  • GitHub App froefam-automerge created under drache42, installed on this repo only, permissions Contents RW + Pull requests RW.
  • AUTOMERGE_APP_PRIVATE_KEY stored as a Dependabot secret (Dependabot-triggered runs only read that store).
  • AUTOMERGE_APP_CLIENT_ID stored as an Actions variable.

Verification

  • Smoke-tested token minting twice on throwaway branches — the second with the exact shipping config (client-id + variable + both permission-* pins): installation resolves, token mints, scoped to this repo only.
  • Adversarial review + /code-review; all findings folded in.
  • End-to-end (App-token auto-merge -> main.yml fires) is only verifiable with a real Dependabot PR — see below.

Deliberate scope

  • WakeOnLanService not mirrored. It ships the identical automerge.yml, but its releases come from a manually pushed release/x.y.z tag, so a skipped post-merge main.yml does not block its releases. Mirroring is a separate follow-up.
  • :latest images will now move on dependency bumps unattended. Every auto-merged patch/minor Dependabot PR now cuts a real release and promotes :latest / :X.Y / :X.Y.Z. This is the intended effect of Auto-merged Dependabot PRs don't trigger Main Pipeline (no version bump / release / image publish) #122.

After merge

Enable Dependabot auto-merge with a token from the froefam-automerge GitHub App
instead of GITHUB_TOKEN. A merge that GITHUB_TOKEN pushes does not start another
workflow run, so main.yml (compute-version / publish / auto-release) never fired
for an auto-merged PR and those dependency updates shipped no version tag,
release, or image. The App identity makes the merge behave like a human merge.

Also drops the workflow's GITHUB_TOKEN permissions to read-only, since the write
identity is now the app token, and documents the new App / secret / variable in
docs/CI-CD.md.

Closes #122

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016RjYwAbyYDjXBfLSdYoSdi
@github-actions github-actions Bot added the semver: patch Bug fix / maintenance label Aug 29, 2026
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

🟢 SemVer classification: semver: patch

Rationale: Changes are CI/infrastructure workflow improvements (.github/) and documentation updates (docs/) with no impact on application code, deployment, or user-facing behavior.

Comment thread .github/workflows/automerge.yml
Comment thread .github/workflows/automerge.yml
The failure() step also fires when Fetch Dependabot metadata fails, so don't
attribute the failure specifically to the token/merge step.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016RjYwAbyYDjXBfLSdYoSdi
Comment thread .github/workflows/automerge.yml
Comment thread .github/workflows/automerge.yml
@drache42
drache42 merged commit eb1724a into main Aug 29, 2026
12 checks passed
@drache42
drache42 deleted the fix/automerge-app-token branch August 29, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver: patch Bug fix / maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-merged Dependabot PRs don't trigger Main Pipeline (no version bump / release / image publish)

1 participant