Repository navigation
ci: make release tags immutable, as in substrate-gke - #24
Merged
Merged
Conversation
Split tag protection into the two rulesets ai-on-gke/substrate-gke uses: - protect-tags-create: tags can't be created, except by repository admins. - protect-tags-immutable: once created, a tag can't be moved or deleted by anyone, including admins. The tag name pattern (vMAJOR.MINOR.PATCH[-PRERELEASE]) moves to the ruleset with no bypass. In the single protect-tags ruleset, admins could bypass it, and admins are the only ones who can create tags, so it never applied. After merge, an admin runs scripts/apply-rulesets.sh to create the two rulesets, then deletes the old protect-tags ruleset in the repository settings. Part of #14.
5 of 6 tasks
11 of 12 tasks
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.
Part of #14, under the release epic #12. Stacked on #23.
What
Aligns tag protection with how ai-on-gke/substrate-gke is set up: two rulesets, so a release tag can't be changed once it exists.
protect-tags-createprotect-tags-immutablevMAJOR.MINOR.PATCH[-PRERELEASE].They replace the single
protect-tagsruleset.What changes in practice
protect-tags. A published release tag then always points at the commit its images were built from.One thing to be aware of: a tag pushed by mistake can no longer be deleted without first editing the ruleset.
After merge
Nothing is applied yet. A repo admin runs:
and then deletes the old
protect-tagsruleset under Settings → Rules → Rulesets. The script never deletes a live ruleset. Creating the new ones first means tags are never left unprotected.Testing
scripts/apply-rulesets.sh --dry-runon this branch:The
rulesetsworkflow only runs for pull requests intomain, so it will run here once #23 merges and this is retargeted.