ci: push personal staging refs with PAT - #15
Merged
Merged
Conversation
Use the workflows-scoped staging PAT for trusted checkout credentials while retaining the default GitHub token fallback when the secret is absent. Signed-off-by: Bryan Li <bryan.li@gmail.com> Co-authored-by: omnigent <noreply@omnigent.ai>
Use the PAT for the floating nightly ref update, suppress automation-triggered push fan-out, and guard nightly main synchronization against non-main dispatches. Signed-off-by: Bryan Li <bryan.li@gmail.com> Co-authored-by: omnigent <noreply@omnigent.ai>
Preserve GitHub token fallback merge behavior, force skip-marked merge commits only for PAT pushes, and restrict PAT-bearing jobs to the staging-push environment. Signed-off-by: Bryan Li <bryan.li@gmail.com> Co-authored-by: omnigent <noreply@omnigent.ai>
btli
pushed a commit
that referenced
this pull request
Aug 14, 2026
Squash of the fork's staging automation onto upstream main: the hourly/ nightly/images workflows and the stage.py composer with its tests and docs, including the STAGING_PUSH_TOKEN environment fallback (PR #15) and branch: extras pins (PR #16), with homelab pinned. Full prior history preserved at tag archive/main-2026-08-14. Signed-off-by: Bryan Li <bryan.li@databricks.com>
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.
Related issue
N/A — fork-only CI maintenance.
Summary
STAGING_PUSH_TOKENfor checkout credentials in trusted personal-staging jobs that push Git refs, falling back togithub.tokenwhen the secret is unset.test-composer, Android build code, and GHCR image publishing outside the PAT trust boundary.Test Plan
python3 -c "import yaml,glob; [yaml.safe_load(open(f)) for f in glob.glob('.github/workflows/personal-staging*.yml')]"uv run --frozen --extra dev python -m pytest .github/scripts/personal-staging/uv.lockSHA-256 was unchanged before and after the frozen test run.Demo
N/A — non-visual CI change.
Type of change
Test coverage
Coverage notes
Manually verified all personal-staging workflow YAML parses successfully and the untouched staging composer suite passes all 47 tests under
uv --frozen. No tests changed because this is a checkout credential wiring change.Changelog
N/A — internal fork CI maintenance.
Secret-scoping audit (tribunal r3 MEDIUM — resolved by verification, 2026-08-13)
Verified via API by the orchestrator before merge:
STAGING_PUSH_TOKENcopy (the r2 exfiltration path is closed).staging-pushexists with deployment branch policy selected branches:main(branch type, no tag patterns).|| github.tokenfallback is active, byte-identical to pre-PR behavior. When minting the PAT (Contents+Workflows RW, btli/omnigent only), store it only as an environment secret at Settings → Environments → staging-push →STAGING_PUSH_TOKEN. Never as a repo-level secret.staging-pushenvironment is ever deleted, GitHub auto-recreates it on next run without protection rules — recreate the main-only branch policy immediately.