Skip to content

Commit c9e5b2d

Browse files
authored
feat(ci): Use GitHub App token instead of default token (#7680)
Switch the Auto Update Tools workflow to authenticate with the configured GitHub App instead of the default GITHUB_TOKEN. Dependency update PRs (like #7675) will now be created and updated using the SENTRY_DEPENDENCY_UPDATER_GITHUB_APP_* credentials. This ensures PRs and commits are attributed to the app rather than the default workflow token. The workflow generates and uses the app token for checkout and both create-pull-request steps (clang-format and swiftlint).
1 parent 7d72315 commit c9e5b2d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/auto-update-tools.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,17 @@ jobs:
6161
needs: files-changed
6262
runs-on: macos-15
6363
steps:
64+
- name: Generate GitHub App Token
65+
id: app_token
66+
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
67+
with:
68+
app-id: ${{ vars.SENTRY_DEPENDENCY_UPDATER_GITHUB_APP_ID }}
69+
private-key: ${{ secrets.SENTRY_DEPENDENCY_UPDATER_GITHUB_APP_PRIVATE_KEY }}
70+
owner: ${{ github.repository_owner }}
6471
- name: Checkout Repository
6572
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
73+
with:
74+
token: ${{ steps.app_token.outputs.token }}
6675
- name: Update Homebrew
6776
run: brew update
6877

@@ -84,6 +93,7 @@ jobs:
8493
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
8594
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
8695
with:
96+
token: ${{ steps.app_token.outputs.token }}
8797
add-paths: scripts/.clang-format-version
8898
branch: github-actions/auto-update-tools-clang-format
8999
commit-message: "chore(deps): Update clang-format version"
@@ -96,6 +106,7 @@ jobs:
96106
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
97107
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
98108
with:
109+
token: ${{ steps.app_token.outputs.token }}
99110
add-paths: scripts/.swiftlint-version
100111
branch: github-actions/auto-update-tools-swiftlint
101112
commit-message: "chore(deps): Update swiftlint version"

0 commit comments

Comments
 (0)