Skip to content

Source release PAT from publishing environment and drop unused smoke-test token refs#1921

Open
Kaniska244 with Copilot wants to merge 2 commits into
mainfrom
copilot/update-pat-secrets-names
Open

Source release PAT from publishing environment and drop unused smoke-test token refs#1921
Kaniska244 with Copilot wants to merge 2 commits into
mainfrom
copilot/update-pat-secrets-names

Conversation

Copilot AI commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Aligns the release automation workflows with the established push workflows by sourcing the release PAT from the admin-restricted publishing environment instead of repository-level secrets, renames it to RELEASE_AUTOMATION_PAT, and removes dead GITHUB_TOKEN references that the smoke-test action never consumes.

Changes

  • release-pr.yml: Added environment: publishing to the update_manifest_files job so the PAT resolves from the publishing environment (matching version-history.yml and the push workflows). Renamed secrets.PATsecrets.RELEASE_AUTOMATION_PAT in both push and PR-creation steps.
  • version-history.yml: Renamed secrets.PATsecrets.RELEASE_AUTOMATION_PAT (job already runs in environment: publishing).
  • Smoke workflows (smoke-*.yaml): Removed the unused env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} blocks (15 occurrences across 14 files). The smoke-test composite action and its scripts never reference GITHUB_TOKEN, and several smoke workflows (cpp, jekyll, base-alpine) already omitted it.

The push workflows authenticate to the registry via TOKEN_NAME/PASSWORD and were left unchanged.

  update_manifest_files:
    runs-on: ubuntu-latest
    environment: publishing        # secrets resolve from the admin-only env
    ...
      - name: Push manifest updates
        env:
          GITHUB_TOKEN: ${{ secrets.RELEASE_AUTOMATION_PAT }}

Follow-up

Requires the PAT secret in the publishing environment to be renamed to RELEASE_AUTOMATION_PAT for these workflows to function.

@Kaniska244

Copy link
Copy Markdown
Contributor

@copilot Update the checkout action reference to v6 in .github/actions/smoke-test/action.yaml ?

Copilot AI commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Update the checkout action reference to v6 in .github/actions/smoke-test/action.yaml ?

Updated actions/checkout from v3 to v6 in .github/actions/smoke-test/action.yaml in 2b0898e.

Copilot AI requested a review from Kaniska244 June 29, 2026 16:59
@Kaniska244 Kaniska244 marked this pull request as ready for review June 30, 2026 09:07
@Kaniska244 Kaniska244 requested a review from a team as a code owner June 30, 2026 09:07
Copilot AI review requested due to automatic review settings June 30, 2026 09:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.PAT to secrets.RELEASE_AUTOMATION_PAT and align release-pr.yml with other publishing-environment workflows by adding environment: publishing.
  • Remove unused env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} blocks from multiple smoke workflows.
  • Update the smoke-test composite action to use actions/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

Comment on lines 32 to 35
- name: Push manifest updates
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
GITHUB_TOKEN: ${{ secrets.RELEASE_AUTOMATION_PAT }}
run: |
Comment on lines 89 to 93
id: push_image_info
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
GITHUB_TOKEN: ${{ secrets.RELEASE_AUTOMATION_PAT }}
run: |
set -e
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.

3 participants