Skip to content

Commit 98aa3e6

Browse files
authored
fix: use GitHub App token in integration-tests workflow (#100)
1 parent ff18889 commit 98aa3e6

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/integration-tests.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,32 @@ jobs:
1414
pull-requests: write
1515

1616
steps:
17+
- name: Generate GitHub App token
18+
id: app-token
19+
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
20+
with:
21+
app-id: ${{ secrets.BRAINTRUST_BOT_APP_ID }}
22+
private-key: ${{ secrets.BRAINTRUST_BOT_PRIVATE_KEY }}
23+
owner: braintrustdata
24+
repositories: |
25+
braintrust
26+
braintrust-sdk-python
27+
permission-contents: write
28+
permission-pull-requests: write
29+
1730
- name: Checkout parent repository
1831
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1932
with:
2033
repository: braintrustdata/braintrust
2134
path: braintrust
22-
token: ${{ secrets.CROSS_REPO_TOKEN }}
35+
token: ${{ steps.app-token.outputs.token }}
2336
fetch-depth: 0
2437

2538
- name: Configure Git in parent repository
2639
run: |
2740
cd braintrust
28-
git config user.name "GitHub Actions Bot"
29-
git config user.email "actions@github.com"
41+
git config user.name "${{ steps.app-token.outputs.app-slug }}[bot]"
42+
git config user.email "${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com"
3043
3144
- name: Initialize and update SDK submodule
3245
run: |
@@ -41,7 +54,7 @@ jobs:
4154
- name: Create integration test PR
4255
run: ./braintrust/sdk/scripts/create-integration-test-pr.sh
4356
env:
44-
GH_TOKEN: ${{ secrets.CROSS_REPO_TOKEN }}
57+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
4558
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
4659
COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
4760
PARENT_REPO_PATH: braintrust

0 commit comments

Comments
 (0)