Skip to content

Commit 3d95f8f

Browse files
committed
ci: use sync app for canvas pull requests
Generate an installation token from the existing foundry-toolkit sync App and use it for target checkout and pull-request creation. Keep the default GITHUB_TOKEN read-only.
1 parent a5f4ce0 commit 3d95f8f

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/sync-foundry-agent-canvas.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,20 @@ jobs:
8989
needs: build
9090
runs-on: ubuntu-latest
9191
permissions:
92-
contents: write
93-
pull-requests: write
92+
contents: read
9493

9594
steps:
95+
- name: Generate GitHub App token
96+
id: app-token
97+
uses: actions/create-github-app-token@v1
98+
with:
99+
app-id: ${{ secrets.SYNC_APP_ID }}
100+
private-key: ${{ secrets.SYNC_APP_PRIVATE_KEY }}
101+
96102
- name: Checkout foundry-toolkit
97103
uses: actions/checkout@v4
98104
with:
105+
token: ${{ steps.app-token.outputs.token }}
99106
ref: main
100107
fetch-depth: 0
101108
path: target
@@ -153,7 +160,7 @@ jobs:
153160
id: cpr
154161
uses: peter-evans/create-pull-request@v8
155162
with:
156-
token: ${{ github.token }}
163+
token: ${{ steps.app-token.outputs.token }}
157164
path: target
158165
base: main
159166
branch: bot/sync-foundry-agent-canvas-v${{ inputs.marketplace_version }}

0 commit comments

Comments
 (0)