Repository navigation
chore(ci): pin actions by SHA and keep write tokens away from installed packages - #18
Merged
Merged
Conversation
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.
Summary
Keeps write tokens out of jobs that download packages, and pins every third-party action to a commit, as hamidfzm/glyph's CI rules require.
Changes
Validate is split in two.
npx --yes ajv-cli@5, which downloads ajv-cli and its dependencies and runs them. It did so with acontents: writetoken saved in.git/configby the checkout, and pushed with that token afterwards.validatehas read-only access and keeps every check it had.publish-indexjob, on pushes tomainonly, regenerates the index with this repo's own scripts and pushes. Those scripts use only Node's standard library, so no downloaded package ever sits next to the token.5.0.0.Release plugins runs only this repo's scripts. Its checkout no longer saves the token. The push passes it through
env, as hamidfzm/glyph's dependency sync does.Docs site is split into
build, read-only, which runs the export, anddeploy, the only job that can publish to Pages.glyph-md/export-website-action@v1on purpose: the rolling tag renders the docs with the newest Glyph release.Smoke gets read-only permissions.
Pinned actions (and off Node 20):
actions/checkoutv6.1.0;actions/upload-pages-artifactv5.0.0;actions/deploy-pagesv5.0.1.These are the same SHAs hamidfzm/glyph uses. The old
upload-pages-artifactv4 anddeploy-pagesv4 run on Node 20.Dependabot keeps the pins current: weekly, a 7-day cooldown, and no major versions.
Testing
publish-indexis skipped on a PR, by design.publish-indexjobs run after the merge. Their first runs are the proof; I'll check them.