Skip to content

mirror-from-saltstack-salt: use salt-bot App token instead of PAT - #70026

Merged
dwoz merged 1 commit into
saltstack:masterfrom
dwoz:nightlies-mirror-use-app-token
Aug 13, 2026
Merged

mirror-from-saltstack-salt: use salt-bot App token instead of PAT#70026
dwoz merged 1 commit into
saltstack:masterfrom
dwoz:nightlies-mirror-use-app-token

Conversation

@dwoz

@dwoz dwoz commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Follow-up to #70017. Replaces the MIRROR_TOKEN PAT approach in mirror-from-saltstack-salt.yaml with the salt-bot App token pattern already established by run-nightly.yml and dependabot-sync.yml:

  • Mints a per-run token via actions/create-github-app-token@v1 using vars.APP_ID + secrets.APP_PRIVATE_KEY (same variable/secret names the other salt-bot workflows use).
  • Gates the job with environment: mirror-salt-nightlies so the App credentials are only reachable through that GitHub environment. Protection rules (approvals, allowed refs) can be configured in saltstack/salt-nightlies → Settings → Environments after this merges.
  • Drops the git config user.name/user.email step — git push --mirror doesn't create commits, so no local identity is required.

Still hard-gated with if: github.repository == 'saltstack/salt-nightlies', so this remains dormant on saltstack/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_TOKEN PAT with contents:write + workflows:write on saltstack/salt-nightlies.

New Behavior

Uses the same salt-bot App credentials that run-nightly.yml and dependabot-sync.yml already consume. No PAT to provision, standard pattern, per-run scoped token.

On saltstack/salt itself: still no change — workflow remains dormant under the repository gate.

Merge requirements satisfied?

  • Docs — N/A.
  • Changelog — none added; happy to add a towncrier entry if maintainers require.
  • Tests — no automated tests; workflow is an Actions definition.

Commits signed with GPG?

No.

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant