Repository navigation
ci: push floating tags with a deploy key - #216
Merged
Merged
Conversation
Move the vX and vX.Y tags over SSH with the TAG_DEPLOY_KEY deploy key so the release-tags ruleset can restrict tag updates to that key. Releases are still created with GITHUB_TOKEN. Skip Check dist/ on tag pushes, since deploy-key pushes trigger workflows. Refs #212 Signed-off-by: Terry Howe <terrylhowe@gmail.com>
TerryHowe
force-pushed
the
feat/212-deploy-key-floating-tags
branch
from
October 21, 2026 10:56
389a169 to
48570c1
Compare
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.
Fixes #212.
What this changes
The floating
vX/vX.Ytags are now pushed over SSH with a repository deploy key instead ofGITHUB_TOKEN. GitHub doesn't acceptGITHUB_TOKEN(the GitHub Actions app) as a ruleset bypass actor, so this is what lets therelease-tagsruleset block tag updates by anyone except the release workflows.auto-release.yml,update-version.yml: checkout setsssh-key: ${{ secrets.TAG_DEPLOY_KEY }}. The existinggit push --forcecommands don't change; they now authenticate with the key. Releases are still created withGITHUB_TOKEN.check-dist.yml:pushis limited to branches. Deploy-key pushes trigger workflows (GITHUB_TOKENpushes don't), so each floating-tag move would otherwise start aCheck dist/run.branches: ['**']is used rather thantags-ignore, because a tags-only filter would also stop branch pushes.RELEASING.md: documents the deploy key, how to create or rotate it, and how to recover if it's missing.The release flow is otherwise unchanged: the daily update PR, then merge, then auto-release publishes
vX.Y.Zand movesvX/vX.Y.Deploy key
The
release tagsdeploy key (write access) and theTAG_DEPLOY_KEYsecret were created and configured on 2026-10-17. Instructions for rotating the key are inRELEASING.md.If the secret were ever missing,
actions/checkoutfalls back toGITHUB_TOKENand the tag push works as it does today. Don't tighten the ruleset until a release has moved the tags with the key.After merge: tighten the ruleset
Add the
updateandnon_fast_forwardrules torelease-tags(ID25296857), with deploy keys as the only bypass actor. Keepdeletion, and don't addcreation, since maintainers still createvX.Y.0tags. In the UI: Settings → Rules → Rulesets →release-tags→ Bypass list → Deploy keys.Post-Merge Validation
Scope:
oras-project/setup-orasrelease automation only: the floating-tag push inauto-release.ymlandupdate-version.yml, theCheck dist/push trigger, and therelease-tagsruleset. No change to the action's runtime behavior for consumers.Checks:
gh repo deploy-key list --repo oras-project/setup-orasgh secret list --repo oras-project/setup-oras | grep TAG_DEPLOY_KEYmainsucceeds —gh workflow run auto-release.yml --repo oras-project/setup-oras --ref mainthengh run list --repo oras-project/setup-oras --workflow auto-release.yml --limit 1gh api repos/oras-project/setup-oras/rulesets/25296857 --jq '{rules: [.rules[].type], bypass: .bypass_actors}'git ls-remote https://github.com/oras-project/setup-oras 'refs/tags/v2*'git push origin v2 --forcefrom a maintainer clone fails with a ruleset errorCheck dist/runs on tag refs —gh run list --repo oras-project/setup-oras --workflow check-dist.yml --limit 10 --json headBranch --jq '.[].headBranch'Expected: deploy key
release tagswith write access; ruleset rulesdeletion,update,non_fast_forwardwith deploy-key bypass; after the next release,v2,v2.0and the newv2.0.Npoint at the same commit; the auto-release run is green; noCheck dist/runs withheadBranchv2orv2.0.Rollback: remove the
update/non_fast_forwardrules from ruleset25296857, then revert this PR. Without the secret, checkout falls back toGITHUB_TOKENas before.