aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Stellard <tstellar@redhat.com>2026-02-02 16:01:36 -0800
committerTom Stellard <tstellar@redhat.com>2026-02-02 16:57:22 -0800
commit25ae460afeb117707487e25a9a4eb410bdf8e4fb (patch)
tree7b4f99d1fff84898abb65e9c76c412b7b1d130c0
parent4c635107ded1341b453569beb5b279c625939e5a (diff)
downloadllvm-users/tstellar/github-app-token.zip
llvm-users/tstellar/github-app-token.tar.gz
llvm-users/tstellar/github-app-token.tar.bz2
workflows/commit-access-review: Use a GitHub App access token instead of llvmbotusers/tstellar/github-app-token
This replaces the use of an access token associated with the llvmbot account with one that is generated by a GitHub App. This is slightly better, because it eliminates the need to periodically rotate the llvmbot tokens, which is difficult to do, since it requires sharing a password and 2fa code among all the admins. The tokens generated by the app automatically expire after an hour, and the private key that is used to request it can be easily rotated by an LLVM Organization owner. Also, since a single private key can be used to generate many tokens, there is only one secret to rotate instead of many.
-rw-r--r--.github/workflows/commit-access-review.yml12
1 files changed, 11 insertions, 1 deletions
diff --git a/.github/workflows/commit-access-review.yml b/.github/workflows/commit-access-review.yml
index 2809b1c..7577870 100644
--- a/.github/workflows/commit-access-review.yml
+++ b/.github/workflows/commit-access-review.yml
@@ -21,11 +21,21 @@ jobs:
- name: Install dependencies
run: |
pip install --require-hashes -r ./llvm/utils/git/requirements.txt
+
+ - id: app-token
+ uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf #v2.2.1
+ with:
+ app-id: ${{ secrets.LLVM_TOKEN_GENERATOR_CLIENT_ID }}
+ private-key: ${{ secrets.LLVM_TOKEN_GENERATOR_PRIVATE_KEY }}
+ owner: ${{ github.repository_owner }}
+ permission-members: read
+ permission-contents: read
- name: Run Script
env:
- GITHUB_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
+ GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
+ echo "${{ steps.app-token.outputs.app-slug }}[bot]"
python3 .github/workflows/commit-access-review.py $GITHUB_TOKEN
- name: Upload Triage List