Repository navigation
ci: pin actions, guard the release tag, split the spec-drift job - #64
Merged
Merged
Conversation
- every `uses:` names a full commit SHA, with the tag in a trailing comment; Dependabot's action bumps are grouped into one PR - top-level `permissions: contents: read` in ci, mutation, release and spec-drift; jobs that write keep their own grants - release.yml refuses a tag whose commit is not on main, or that does not match package.json, before anything is installed - spec-drift.yml is two jobs: `regenerate` installs, regenerates, builds and runs the smoke tests with a read-only token and no secrets, and uploads the two generated files; `open-pr` copies them over a clean checkout, mints the app token and opens the PR. Triggers, PR, issues and the red run on a build failure are unchanged - test/unit/workflows.test.ts holds the workflow shape in place Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
Routine CI maintenance: pin the actions, scope the workflow token, make the release job check its tag, and split the spec-drift job in two.
Changes
uses:names a full commit SHA with the tag (or branch) in a trailing comment. A tag can be moved to different code; a SHA cannot. Dependabot already watchesgithub-actionshere; its bumps are now grouped into one PR.ci.yml,mutation.yml,release.ymlandspec-drift.ymldeclarepermissions: contents: readat the top level. The first two had no block and only ever read. Jobs that write (release, the PR half of spec drift) keep their own grants.docs.ymlalready had a block and is unchanged apart from the pins.origin/main(the checkout now fetches full history for this).package.json.regenerate:npm ci,npm run regenerate, build, live smoke tests. Read-only token, no secrets, checkout credentials not persisted. Uploads the two generated files (src/_generated/schema.ts,src/_generated/dailyColumns.ts) as an artifact.open-pr: fresh checkout, downloads the artifact to the runner's temp directory, copies exactly the named file(s) into place, mints the app token, opens the PR, raises the issues, and fails the run when the first job reported a failure. It runs no repository or dependency code.JasonEtco/create-an-issuev21b14a70e4d8dc185e5cc76d3bec9eab20257b2c5actions/checkoutv73d3c42e5aac5ba805825da76410c181273ba90b1actions/create-github-app-tokenv3f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fcactions/deploy-pagesv5368f82528645a54fb793d4d04e342629a3f51346actions/setup-nodev78fccf151e3ba8038c300f83b40c8fd1e94f9c5ceactions/upload-pages-artifactv5fc324d3547104276b827a68afc52ff2a11cc49c9peter-evans/create-pull-requestv83ffccacd46053766916f087ce41d627c0b8cf2d1softprops/action-gh-releasev388b783939ccdbabad21b9a37510aed7fad5f2e60actions/upload-artifactv7(new in this PR)cf430e030ddbb5b0abf93d22962f4752f3646cd9actions/download-artifactv8(new in this PR)9000827ccba6bdab643e8b6fd33ac0654aef8333Behaviour changes to know about
mainnow fails the release job instead of publishing. Merge first, then tag the merged commit. A maintenance release cut from a long-lived branch other thanmainwould also be refused; that needs a deliberate edit to the check.package.jsonnow fails instead of publishing the manifest's version under the wrong tag.Not in this PR
Testing
regenerate/open-prjob to read); with them applied it passes (21 passed; full unit suite 321 passed, lint, prettier and typecheck clean).workflow_dispatch) after merge and confirm both jobs go green before relying on the nightly run.🤖 Generated with Claude Code