Skip to content

Use GitHub App token in update workflows#54

Closed
rujche wants to merge 6 commits into
Azure:mainfrom
rujche:rujche/main-use-github-app-instead-of-PAT
Closed

Use GitHub App token in update workflows#54
rujche wants to merge 6 commits into
Azure:mainfrom
rujche:rujche/main-use-github-app-instead-of-PAT

Conversation

@rujche

@rujche rujche commented Jul 1, 2026

Copy link
Copy Markdown
Member

What

  • Replace ACCESS_TOKEN usage with GitHub App installation token in update workflows.
  • Add a reusable local action for token generation at .github/actions/github-app-token/action.yml.
  • Scope GitHub App tokens to azure-sdk-for-java via a repositories input to enforce least privilege.
  • Set persist-credentials: false on authenticated actions/checkout steps that use installation tokens.
  • Update PR/push flow to use same-repo branch format with GitHub App token.
  • Upgrade actions/checkout from v3 to v4 in the updated workflows.
  • Pin third-party actions to fixed release tags:
    • actions/create-github-app-token@v3.2.0
    • vsoch/pull-request-action@1.1.1

Why

  • Remove PAT dependency and standardize on GitHub App auth.
  • Reduce token blast radius and credential persistence risk in workflow runners.
  • Improve reproducibility and supply-chain hygiene by avoiding floating refs.

Updated files

  • .github/actions/github-app-token/action.yml
  • .github/workflows/update-spring-cloud-azure-support-file.yml
  • .github/workflows/test-spring-boot-rc-version.yml
  • .github/workflows/update-spring-dependencies.yml

@rujche rujche requested review from Netyyyy, Copilot and moarychan July 1, 2026 01:33
@rujche rujche self-assigned this Jul 1, 2026
@rujche rujche moved this from Todo to In Progress in Spring Cloud Azure Jul 1, 2026
@rujche rujche added this to the 2026-07 milestone Jul 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the repository’s scheduled/manual “update” workflows away from a personal access token (ACCESS_TOKEN) to a GitHub App installation token, centralizing token creation in a reusable local composite action and updating workflow dependencies accordingly.

Changes:

  • Introduces a local composite action (.github/actions/github-app-token) to generate a GitHub App installation token.
  • Updates the Spring dependency/support-file/RC test workflows to use the GitHub App token for API calls, checkout auth, and pushing branches/creating PRs.
  • Upgrades actions/checkout usage in the touched workflows from v3 to v4.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
.github/workflows/update-spring-dependencies.yml Switches workflow auth from PAT to GitHub App token and updates checkout/push/PR creation flow accordingly.
.github/workflows/update-spring-cloud-azure-support-file.yml Uses GitHub App token for PR checks, repo checkout, pushing update branches, and PR/comment automation.
.github/workflows/test-spring-boot-rc-version.yml Uses GitHub App token for checkout/push/PR creation/commenting and upgrades checkout to v4.
.github/actions/github-app-token/action.yml Adds a reusable composite action wrapping actions/create-github-app-token for token generation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/update-spring-dependencies.yml Outdated
Comment thread .github/workflows/update-spring-cloud-azure-support-file.yml Outdated
Comment thread .github/workflows/test-spring-boot-rc-version.yml Outdated
Comment thread .github/actions/github-app-token/action.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

Comment thread .github/actions/github-app-token/action.yml Outdated
Comment thread .github/workflows/update-spring-dependencies.yml
Comment thread .github/workflows/update-spring-cloud-azure-support-file.yml
Comment thread .github/workflows/test-spring-boot-rc-version.yml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread .github/actions/github-app-token/action.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

Comment thread .github/workflows/update-spring-cloud-azure-support-file.yml Outdated
Comment thread .github/workflows/update-spring-cloud-azure-support-file.yml Outdated
Comment thread .github/workflows/update-spring-dependencies.yml Outdated
Comment thread .github/workflows/update-spring-dependencies.yml Outdated
Comment thread .github/workflows/test-spring-boot-rc-version.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@rujche

rujche commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

Closing this PR to recreate it from origin branch as requested.

@rujche rujche closed this Jul 1, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Spring Cloud Azure Jul 1, 2026
@rujche rujche moved this from Done to Cut in Spring Cloud Azure Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Cut

Development

Successfully merging this pull request may close these issues.

2 participants