Skip to content

Commit 1e7eb69

Browse files
authored
chore(ci): use github app token instead of bot user (#206)
1 parent c418c5e commit 1e7eb69

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
steps:
4343
- name: Checkout repository
44-
uses: actions/checkout@v3
44+
uses: actions/checkout@v4
4545

4646
# Initializes the CodeQL tools for scanning.
4747
- name: Initialize CodeQL

.github/workflows/prepare-release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ jobs:
1919
prepare:
2020
runs-on: ubuntu-latest
2121
steps:
22+
- uses: mongodb-js/devtools-shared/actions/setup-bot-token@main
23+
id: app-token
24+
with:
25+
app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }}
26+
private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }}
27+
2228
- uses: actions/checkout@v4
2329

2430
- name: Use Node.js 20.x
@@ -36,7 +42,7 @@ jobs:
3642
with:
3743
branch: release/${{ steps.version.outputs.new-version }}
3844
title: 'chore: bump version to ${{ steps.version.outputs.new-version }}'
39-
token: ${{ secrets.SVC_DEVTOOLSBOT_TOKEN }}
45+
token: ${{ steps.app-token.outputs.token }}
4046
draft: false
4147
body: |
4248
An automated PR for next release.

.github/workflows/publish-release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ jobs:
1111
name: Production
1212
url: https://www.npmjs.com/package/@mongodb-js/oidc-plugin/v/${{ steps.get-version.outputs.package_version }}
1313
steps:
14+
- uses: mongodb-js/devtools-shared/actions/setup-bot-token@main
15+
id: app-token
16+
with:
17+
app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }}
18+
private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }}
19+
1420
- uses: actions/checkout@v4
1521

1622
- name: Use Node.js 20.x
@@ -44,7 +50,7 @@ jobs:
4450
- name: Merge Pull Request
4551
uses: juliangruber/merge-pull-request-action@9234b8714dda9a08f3d1df5b2a6a3abd7b695353 # 1.3.1
4652
with:
47-
github-token: ${{ secrets.SVC_DEVTOOLSBOT_TOKEN }}
53+
github-token: ${{ steps.app-token.outputs.token }}
4854
number: ${{ steps.find-pull-request.outputs.number }}
4955
method: squash
5056

0 commit comments

Comments
 (0)