Skip to content

Commit e697b4e

Browse files
authored
ci: get PR approver app token from secret service (#258)
* ci: get PR approver app token from secret service * chore: add missing permission
1 parent d008382 commit e697b4e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/update-abi.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
- 3-x-y
1818
runs-on: ubuntu-latest
1919
environment: auto-updater
20+
permissions:
21+
id-token: write # for secret service access
2022
steps:
2123
- name: Generate GitHub App token (updater app)
2224
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
@@ -54,17 +56,15 @@ jobs:
5456
--body "Automated PR to update abi_registry.json" \
5557
--head "feat/update-abi-registry-${{ matrix.branch }}-${{ hashFiles('abi_registry.json') }}" \
5658
--base ${{ matrix.branch }}
57-
- name: Generate GitHub App token (approver app)
58-
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
59+
- name: Get GitHub App token (approver app)
5960
if: ${{ steps.commit-changes.outputs.sha }}
60-
id: generate-token-approver
61-
with:
62-
creds: ${{ secrets.APPROVER_GH_APP_CREDS }}
61+
id: secret-service
62+
uses: electron/secret-service-action@3476425e8b30555aac15b1b7096938e254b0e155 # v1.0.0
6363
- name: Approve and merge pull request
6464
if: ${{ steps.commit-changes.outputs.sha }}
6565
shell: bash
6666
env:
67-
GITHUB_TOKEN: ${{ steps.generate-token-approver.outputs.token }}
67+
GITHUB_TOKEN: ${{ fromJSON(steps.secret-service.outputs.secrets).PR_APPROVER_GH_TOKEN }}
6868
run: |
6969
set -eo pipefail
7070
gh pr review "feat/update-abi-registry-${{ matrix.branch }}-${{ hashFiles('abi_registry.json') }}" --approve

0 commit comments

Comments
 (0)