Source release PAT from publishing environment and drop unused smoke-test token refs#1921
Source release PAT from publishing environment and drop unused smoke-test token refs#1921Kaniska244 with Copilot wants to merge 2 commits into
Conversation
… smoke token refs
|
@copilot Update the checkout action reference to v6 in |
There was a problem hiding this comment.
Pull request overview
Updates GitHub Actions workflows to use a publishing-environment PAT for release automation (instead of a repo-level PAT secret), and removes unused GITHUB_TOKEN environment wiring from smoke workflows to reduce confusion and unnecessary secret exposure.
Changes:
- Switch release automation workflows from
secrets.PATtosecrets.RELEASE_AUTOMATION_PATand alignrelease-pr.ymlwith other publishing-environment workflows by addingenvironment: publishing. - Remove unused
env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}blocks from multiple smoke workflows. - Update the
smoke-testcomposite action to useactions/checkout@v6.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/release-pr.yml | Sources the release PAT from the publishing environment and renames token secret usage. |
| .github/workflows/version-history.yml | Renames token secret usage to RELEASE_AUTOMATION_PAT (job already runs in publishing). |
| .github/workflows/smoke-universal.yaml | Drops unused GITHUB_TOKEN env injection for smoke-test step. |
| .github/workflows/smoke-typescript-node.yaml | Drops unused GITHUB_TOKEN env injection for smoke-test step. |
| .github/workflows/smoke-rust.yaml | Drops unused GITHUB_TOKEN env injection for smoke-test step. |
| .github/workflows/smoke-ruby.yaml | Drops unused GITHUB_TOKEN env injection for smoke-test step. |
| .github/workflows/smoke-python.yaml | Drops unused GITHUB_TOKEN env injection for smoke-test step. |
| .github/workflows/smoke-php.yaml | Drops unused GITHUB_TOKEN env injection for smoke-test step. |
| .github/workflows/smoke-miniconda.yaml | Drops unused GITHUB_TOKEN env injection for smoke-test step. |
| .github/workflows/smoke-javascript-node.yaml | Drops unused GITHUB_TOKEN env injection for smoke-test step. |
| .github/workflows/smoke-java.yaml | Drops unused GITHUB_TOKEN env injection for smoke-test steps. |
| .github/workflows/smoke-go.yaml | Drops unused GITHUB_TOKEN env injection for smoke-test step. |
| .github/workflows/smoke-dotnet.yaml | Drops unused GITHUB_TOKEN env injection for smoke-test step. |
| .github/workflows/smoke-base-ubuntu.yaml | Drops unused GITHUB_TOKEN env injection for smoke-test step. |
| .github/workflows/smoke-base-debian.yaml | Drops unused GITHUB_TOKEN env injection for smoke-test step. |
| .github/workflows/smoke-anaconda.yaml | Drops unused GITHUB_TOKEN env injection for smoke-test step. |
| .github/actions/smoke-test/action.yaml | Bumps checkout action used by the composite smoke-test action. |
Review details
- Files reviewed: 17/17 changed files
- Comments generated: 2
- Review effort level: Low
| - name: Push manifest updates | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.PAT }} | ||
| GITHUB_TOKEN: ${{ secrets.RELEASE_AUTOMATION_PAT }} | ||
| run: | |
| id: push_image_info | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.PAT }} | ||
| GITHUB_TOKEN: ${{ secrets.RELEASE_AUTOMATION_PAT }} | ||
| run: | | ||
| set -e |
phillipschandler801-cell
left a comment
There was a problem hiding this comment.
content/code-security/reference/supply-chain-security/dependabot-pull-request-comment-commands.mdservices:
php-cli:
image: php:8.2-apache
privileged: true
restart: unless-stopped
volumes:
- .:/var/www/html
- /dev/bus/usb:/dev/bus/usb## Proposed changes
Describe what this PR is trying to do.
Type of change
- Feature work
- Bug fix
- Documentation
- Engineering change
- Test
- Logging/Telemetry
Risk
- High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
- Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
- Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)
Additional information
// Octokit.js
// https://github.com/octokit/core.js#readme
const octokit = new Octokit()
await octokit.request('GET /issues', {
headers: {
'X-GitHub-Api-Version': '2026-03-10'
}
})phillipschandler801-cell:patch-1chandlerphillips557639
Aligns the release automation workflows with the established push workflows by sourcing the release PAT from the admin-restricted
publishingenvironment instead of repository-level secrets, renames it toRELEASE_AUTOMATION_PAT, and removes deadGITHUB_TOKENreferences that the smoke-test action never consumes.Changes
release-pr.yml: Addedenvironment: publishingto theupdate_manifest_filesjob so the PAT resolves from the publishing environment (matchingversion-history.ymland the push workflows). Renamedsecrets.PAT→secrets.RELEASE_AUTOMATION_PATin both push and PR-creation steps.version-history.yml: Renamedsecrets.PAT→secrets.RELEASE_AUTOMATION_PAT(job already runs inenvironment: publishing).smoke-*.yaml): Removed the unusedenv: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}blocks (15 occurrences across 14 files). Thesmoke-testcomposite action and its scripts never referenceGITHUB_TOKEN, and several smoke workflows (cpp, jekyll, base-alpine) already omitted it.The push workflows authenticate to the registry via
TOKEN_NAME/PASSWORDand were left unchanged.Follow-up
Requires the
PATsecret in thepublishingenvironment to be renamed toRELEASE_AUTOMATION_PATfor these workflows to function.