ci: gate lockfile maintenance on main, release environment, read scope - #67
Merged
Conversation
- run only on refs/heads/main: a workflow_dispatch from another ref would force-push the maintenance branch from a stale base - environment: release — PUTIO_RELEASE_BOT_CLIENT_ID and the App private key are environment-scoped; the first dispatch failed to mint a token without it (taizn actions run 32328993072) - job-level contents: read for checkout, matching the house baseline - align the bot identity lookup with the fleet-majority form (%5Bbot%5D path, user_id output) Refs putdotio/putio-frontend#29 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the lockfile maintenance GitHub Actions workflow to align with the repo’s established “release” job conventions and to prevent unsafe/manual dispatches from non-main refs from force-updating the maintenance branch.
Changes:
- Gate the lockfile refresh job to run only on
refs/heads/main. - Attach the job to the
releaseenvironment (withdeployment: false) so environment-scoped secrets/vars are available. - Restrict default job token permissions to
contents: readand align bot identity resolution/output naming with the CI release job pattern.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
|
🎉 This PR is included in version 2.4.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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
Follow-up to the merged lockfile-maintenance workflow (putio-frontend#29). The first live dispatch failed to mint the release-bot token — taizn run 32328993072 — because
PUTIO_RELEASE_BOT_CLIENT_IDand the App private key are scoped to thereleaseenvironment and the job declared no environment.environment: release(deployment: false, house release-job form)refs/heads/mainso a dispatch from another ref cannot force-push the maintenance branch from a stale basecontents: readfor checkout, matching the house baseline%5Bbot%5Dpath,user_idoutput)Verification
Notes
Refs putdotio/putio-frontend#29