mirror-from-saltstack-salt: use salt-bot App token instead of PAT - #70026
Merged
Conversation
…TOKEN PAT Match the salt-bot pattern established by run-nightly.yml and dependabot-sync.yml: mint a per-run token from the App via actions/create-github-app-token@v1 using vars.APP_ID + secrets.APP_PRIVATE_KEY, rather than requiring a separately-provisioned MIRROR_TOKEN PAT. Also gate the job with environment: mirror-salt-nightlies so the salt-bot credentials are only accessible from that environment (protection rules can be configured in salt-nightlies Settings → Environments). Drop the git config user.name/user.email step — git push --mirror doesn't create commits, so no local identity is needed. Still hard-gated with `if: github.repository == 'saltstack/salt-nightlies'` so this remains dormant on saltstack/salt.
This was referenced Aug 13, 2026
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.
What does this PR do?
Follow-up to #70017. Replaces the MIRROR_TOKEN PAT approach in
mirror-from-saltstack-salt.yamlwith the salt-bot App token pattern already established byrun-nightly.ymlanddependabot-sync.yml:actions/create-github-app-token@v1usingvars.APP_ID+secrets.APP_PRIVATE_KEY(same variable/secret names the other salt-bot workflows use).environment: mirror-salt-nightliesso the App credentials are only reachable through that GitHub environment. Protection rules (approvals, allowed refs) can be configured insaltstack/salt-nightlies→ Settings → Environments after this merges.git config user.name/user.emailstep —git push --mirrordoesn't create commits, so no local identity is required.Still hard-gated with
if: github.repository == 'saltstack/salt-nightlies', so this remains dormant onsaltstack/salt.What issues does this PR fix or reference?
Follow-up to #70017. No linked issue.
Previous Behavior
The mirror workflow (added in #70017) required a separately-provisioned
MIRROR_TOKENPAT withcontents:write+workflows:writeonsaltstack/salt-nightlies.New Behavior
Uses the same salt-bot App credentials that
run-nightly.ymlanddependabot-sync.ymlalready consume. No PAT to provision, standard pattern, per-run scoped token.On
saltstack/saltitself: still no change — workflow remains dormant under the repository gate.Merge requirements satisfied?
Commits signed with GPG?
No.