Repository navigation
feat(repos): let the factory's release deploy key create its release tags - #102
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.
The factory's CI will create each container's release tag after a release-please merge. GitHub does not accept its built-in Actions app as a ruleset bypass actor (the apply of #100 failed with 422, reverted in #101), so CI pushes release tags over SSH with a write deploy key instead.
This change does two things in
terraform/public/workflow-container-factory.yml:Version Tag Authoritykeeps admins as a bypass actor and addsDeployKey, so only admins and the repository's deploy key can create or update a<name>/v*tag.Release Tag Protectionstill keeps deleting or force-moving a tag to admins.releaseenvironment that onlymainmay use. Its secretRELEASE_TAG_DEPLOY_KEY(the deploy key's private half) and the deploy key itself are created outside Terraform, which cannot hold key material; the comment in the file says so.A tag push runs the workflow files at the tagged commit, so limiting who can create release tags is what keeps the factory's signing identity (
build.yaml@refs/tags/<name>/v<version>) trustworthy. The bypass was tested first on a disposable repository: the deploy key is refused without the bypass and accepted with it, a workflow-token push is refused with this exact bypass list, and a tag pushed with a deploy key starts tag-push workflows.