From 6fba01fb65a80bade0517e24ab4662297882f97b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E6=AD=A3=E8=B6=85?= Date: Thu, 2 Apr 2026 20:42:48 +0800 Subject: [PATCH] ci: use GitHub App tokens for CLA bot (#2368) --- .github/workflows/cla.yml | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index bc1ce5cdc..156758fe9 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -22,16 +22,37 @@ on: permissions: contents: read - pull-requests: read - issues: write - checks: write jobs: cla: if: ${{ github.event_name != 'issue_comment' || github.event.issue.pull_request }} runs-on: ubuntu-latest steps: - - name: Run CLA Bot - uses: overtrue/cla-bot@v0.0.1 + - name: Create token for rustfs/rustfs + id: target-token + uses: actions/create-github-app-token@v3 with: - github-token: ${{ github.token }} + app-id: ${{ vars.CLA_BOT_APP_ID }} + private-key: ${{ secrets.CLA_BOT_APP_PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + repositories: ${{ github.event.repository.name }} + permission-contents: read + permission-pull-requests: read + permission-issues: write + permission-checks: write + + - name: Create token for rustfs/cla + id: registry-token + uses: actions/create-github-app-token@v3 + with: + app-id: ${{ vars.CLA_BOT_APP_ID }} + private-key: ${{ secrets.CLA_BOT_APP_PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + repositories: cla + permission-contents: write + + - name: Run CLA Bot + uses: overtrue/cla-bot@7616514cd5d28caafcabcdd96c91466d312bb1fb + with: + github-token: ${{ steps.target-token.outputs.token }} + registry-token: ${{ steps.registry-token.outputs.token }}