Skip to content

Commit f90a465

Browse files
authored
chore(ci): correct secrets for each app usage (#2157)
1 parent 4cfa1b8 commit f90a465

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

.github/workflows/dogfood.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ on:
3030
required: true
3131
PRIVATE_KEY:
3232
required: true
33+
DOGFOOD_APP_ID:
34+
required: true
35+
DOGFOOD_APP_PRIVATE_KEY:
36+
required: true
3337

3438
permissions: {}
3539

@@ -38,8 +42,15 @@ jobs:
3842
name: Trigger Downstream Updates
3943
runs-on: ubuntu-latest
4044
steps:
41-
- name: Generate token
42-
id: app-token
45+
- name: Generate token for member check
46+
id: app-token-member-check
47+
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf
48+
with:
49+
app-id: ${{ secrets.APP_ID }}
50+
private-key: ${{ secrets.PRIVATE_KEY }}
51+
52+
- name: Generate token for dogfood
53+
id: app-token-dogfood
4354
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf
4455
with:
4556
app-id: ${{ secrets.DOGFOOD_APP_ID }}
@@ -52,7 +63,7 @@ jobs:
5263
if: ${{ github.event_name == 'workflow_dispatch' }}
5364
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
5465
with:
55-
github-token: ${{ steps.app-token.outputs.token }}
66+
github-token: ${{ steps.app-token-member-check.outputs.token }}
5667
script: |
5768
const org = 'supabase'
5869
const { actor } = context
@@ -86,7 +97,7 @@ jobs:
8697
VERSION: ${{ inputs.version }}
8798
SOURCE: ${{ inputs.source }}
8899
with:
89-
github-token: ${{ steps.app-token.outputs.token }}
100+
github-token: ${{ steps.app-token-dogfood.outputs.token }}
90101
script: |
91102
const version = process.env.VERSION;
92103
const source = process.env.SOURCE;

.github/workflows/publish.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,10 @@ jobs:
150150
if: ${{ github.event_name == 'workflow_dispatch' && needs.release-stable.result == 'success' }}
151151
uses: ./.github/workflows/dogfood.yml
152152
secrets:
153-
APP_ID: ${{ secrets.DOGFOOD_APP_ID }}
154-
PRIVATE_KEY: ${{ secrets.DOGFOOD_APP_PRIVATE_KEY }}
153+
APP_ID: ${{ secrets.APP_ID }}
154+
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
155+
DOGFOOD_APP_ID: ${{ secrets.DOGFOOD_APP_ID }}
156+
DOGFOOD_APP_PRIVATE_KEY: ${{ secrets.DOGFOOD_APP_PRIVATE_KEY }}
155157
with:
156158
version: ${{ needs.release-stable.outputs.released_version }}
157159
source: supabase-js-stable-release

0 commit comments

Comments
 (0)