Skip to content

Commit 34f2fdb

Browse files
authored
chore(ci): Replace GH_CQ_BOT PAT with GitHub App tokens (#861)
Replace GH_CQ_BOT PAT with short-lived tokens from the cloudquery-ci GitHub App.
1 parent b7d8500 commit 34f2fdb

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

.github/.kodiak.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
version = 1
33

44
[approve]
5-
auto_approve_usernames = ["cq-bot"]
5+
auto_approve_usernames = ["cloudquery-ci"]
66

77
[merge.message]
88
body = "pull_request_body"

.github/workflows/prepare.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,16 @@ jobs:
1010
prepare-dist:
1111
runs-on: ubuntu-latest
1212
steps:
13+
- name: Generate GitHub App token
14+
id: app-token
15+
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3
16+
with:
17+
app-id: ${{ secrets.CQ_APP_ID }}
18+
private-key: ${{ secrets.CQ_APP_PRIVATE_KEY }}
19+
permission-contents: write
1320
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
1421
with:
15-
token: ${{ secrets.GH_CQ_BOT }}
22+
token: ${{ steps.app-token.outputs.token }}
1623
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
1724
with:
1825
node-version: "lts/*"

.github/workflows/release-please.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ jobs:
1111
release-please:
1212
runs-on: ubuntu-latest
1313
steps:
14+
- name: Generate GitHub App token
15+
id: app-token
16+
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3
17+
with:
18+
app-id: ${{ secrets.CQ_APP_ID }}
19+
private-key: ${{ secrets.CQ_APP_PRIVATE_KEY }}
20+
permission-contents: write
21+
permission-pull-requests: write
1422
- uses: GoogleCloudPlatform/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4
1523
with:
16-
token: ${{ secrets.GH_CQ_BOT }}
24+
token: ${{ steps.app-token.outputs.token }}

0 commit comments

Comments
 (0)