Repository navigation
fix(ci): push the lockfile fix as the App so CI is not gated - #297
Merged
Merged
Conversation
A push made with GITHUB_TOKEN is attributed to github-actions[bot], and every workflow run it creates lands in `action_required` awaiting a manual "Approve and run workflows". That is what has been happening to frontend Dependabot PRs. Confirmed on #296: the runs for the lockfile-fix commit d0a0f5e carry actor=github-actions[bot], triggering_actor=github-actions[bot], and conclusion=action_required — five of them. The run that did the pushing (actor=dependabot[bot], on the original SHA) succeeded, so nothing looks wrong from the inside. The reason it goes unnoticed is that the check list then shows a single green license/cla and no failures, which reads as "CI hasn't started" rather than "CI is blocked". #282 sat that way for six days and was only found while reviewing it; #296 is sitting that way now. Only frontend Dependabot PRs are affected, because only they touch frontend/package.json and so fire this workflow. #294 and #295 opened in the same minute and ran green throughout — a clean control. Pushing with a GitHub App installation token makes the resulting runs ordinary. The repo already generates one this way in update-rustledger.yml and update-flake-sources.yml. One caveat that cannot be verified from here: Dependabot-triggered runs read the *Dependabot* secrets store, which is separate from the Actions store those two workflows use. If BOT_APP_ID and BOT_PRIVATE_KEY are only registered as Actions secrets they are invisible to this workflow. Reading org secrets needs admin:org, which I do not have. So the token step is conditional and the checkout falls back to GITHUB_TOKEN, preserving today's behaviour rather than breaking the lockfile fix outright — but the fallback emits a ::warning:: naming the missing secrets and saying the runs will need approval. A degraded path that announces itself is the whole point; silently reverting to the broken behaviour is what made this take six days to find. Commits are attributed to whoever actually pushes them, via the action's app-slug output. Verified all three paths locally: app-slug present commits as <slug>[bot], absent commits as github-actions[bot], and no lockfile change still short-circuits to "No lockfile changes". actionlint clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
A push made with
GITHUB_TOKENis attributed togithub-actions[bot], and every workflow run it creates lands inaction_required, waiting on a manual "Approve and run workflows".Confirmed on #296 — the runs for the lockfile-fix commit
d0a0f5e2:The run that did the pushing (
actor=dependabot[bot], on the original SHA) succeeded, so nothing looks wrong from the inside.What makes it costly is how it presents: the check list shows a single green
license/claand no failures, which reads as "CI hasn't started" rather than "CI is blocked". #282 sat that way for six days and was only found while reviewing it. #296 is sitting that way right now.Only frontend Dependabot PRs are affected, because only they touch
frontend/package.jsonand so fire this workflow. #294 and #295 opened in the same minute and ran green throughout — a clean control.The fix
Push with a GitHub App installation token, which makes the resulting runs ordinary. The repo already generates one this way in
update-rustledger.ymlandupdate-flake-sources.yml.The caveat, and why the fallback is loud
Dependabot-triggered runs read the Dependabot secrets store, which is separate from the Actions store those two workflows use. If
BOT_APP_IDandBOT_PRIVATE_KEYare only registered as Actions secrets, they're invisible here and the token step yields nothing.I couldn't verify which stores they're in — reading org secrets needs
admin:org, which I don't have. Repo-level secrets are genuinely empty in both stores, so they must be org-level.So the token step is conditional and checkout falls back to
GITHUB_TOKEN. That preserves today's behaviour rather than breaking the lockfile fix outright — but the fallback emits a::warning::naming the missing secrets and stating that the runs will need approval. A degraded path that announces itself is the entire point here; silently reverting to the broken behaviour is what let this go unnoticed for six days.Action needed from someone with org admin: confirm
BOT_APP_IDandBOT_PRIVATE_KEYexist as Dependabot org secrets (Settings → Secrets and variables → Dependabot), not just Actions ones. Until then this PR changes nothing except adding the warning.Verification
actionlintexits 0. Commits are attributed to whoever actually pushes, via the action'sapp-slugoutput — I checked that output exists in the action'saction.ymlrather than assuming it. All three paths tested locally:app-slug<slug>[bot]github-actions[bot]How to confirm it worked
The next frontend Dependabot PR should show its full check suite running without an approval prompt, and the regenerate commit authored by the App rather than
github-actions[bot]. If the warning appears in the job log instead, the secrets still need adding to the Dependabot store.