Standardize checkout-as-app in check.yaml format job - #693
Conversation
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0189AKpyNKFsnJbgoMfb31DN
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0189AKpyNKFsnJbgoMfb31DN
Triggered by: ab1dc0b Workflow run: https://github.com/nsheaps/homebrew-devsetup/actions/runs/31267952295
|
CI red on
Confirmed (2) is pre-existing and unrelated to this PR: Generated by Claude Code Generated by Claude Code |
|
Update: the Generated by Claude Code Generated by Claude Code |
Unblocks CI on main, which has been failing cspell for "customizer" (Casks/nsheaps-base.rb comment) and "libexec" (Formula/dotfiles.rb, standard Homebrew/Unix directory term) since before this PR branched.
…literally) The prior commit accidentally committed the base64-encoded blob as the file's literal text content instead of the decoded plain text. This restores the real word list with customizer and libexec added.
checkov's CKV2_GHA_1 requires an explicit non-write-all permissions block at the workflow (top) level, not just the job level. This mirrors the job's existing permissions so behavior is unchanged -- purely satisfies the check. Unrelated to this PR's diff but was blocking check.yaml's Security job (pre-existing on main, confirmed via checkov output on main's latest run).
Summary
Checkout Code(actions/checkout) +Authenticate as GitHub App(local./.github/actions/github-app-authcomposite) steps in.github/workflows/check.yaml'sformatjob with the single centralizednsheaps/github-actions/.github/actions/checkout-as-appstep (pinned SHA), matching the pattern already used innsheaps/ai-mktplandnsheaps/agents/test.yaml. Keptfetch-depth: '0'and addedref: ${{ github.head_ref || github.ref }}since this job pushes formatting fixes back to the PR/push branch. Kept step idauthso downstream references didn't need to change.stefanzweifel/git-auto-commit-actionstep to usesteps.auth.outputs.user-emaildirectly instead of manually synthesizing a noreply email fromuser-id+user-name— the centralized action already providesuser-email.mise run format+git-auto-commit-action) unchanged..github/actions/github-app-auth/(onlyaction.yml) — confirmed no remaining references to./.github/actions/github-app-authanywhere in.github/workflows/*.yaml. Note:pr-status-dispatch.yamluses the unrelated remotensheaps/github-actions/.github/actions/github-app-authaction, which is untouched.ansible/config/sync-files.yml), so this fix is made directly in this repo.Why this took a while to go green
This PR's own diff was correct from the start, but
main'scheck.yamlhad two unrelated, pre-existing failures that blocked every PR in the repo (not just this one):cspell—Casks/nsheaps-base.rbused "customizer" andFormula/dotfiles.rbused "libexec" ×3, neither in the project dictionary. Fixed directly on this branch (added both words to.config/cspell/project.txt).checkov— two findings unrelated to this PR's diff:CKV_GHA_7onapply-repo-settings.yaml'sworkflow_dispatchdry-runinput (a template centrally synced fromnsheaps/.github) — fixed at the source:nsheaps/.github#205.CKV2_GHA_1(missing top-levelpermissions:) ondispatch-review.yaml— also centrally synced fromnsheaps/.github; fixed at the source:nsheaps/.github#206(plus a companion fix to the doc-only mirror innsheaps/agents#324). An earlier attempt to patch this directly in this repo (#722) was closed unmerged once it was clear the file is centrally synced and a local edit would just get overwritten.Once
#205and#206merged andnsheaps/.github's sync propagated the fixes to this repo'smain, this branch was rebased ontomainand bothFormatandSecurityare now green.Test plan
check.yaml) runs green on this PR — bothFormatandSecurityrelease.yaml'sreleasejob still authenticates correctly andsteps.auth.outputs.tokenis available to theRun release-itstep (verify on next push tomainafter merge)Generated by Claude Code