Skip to content

Commit 577fa8c

Browse files
committed
Migrate firebase-tools auth to service account
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent 8b628af commit 577fa8c

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,22 @@ jobs:
5858
5959
- name: QA
6060
env:
61-
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
62-
GOOGLE_CUSTOM_SEARCH_API_KEY: ${{ secrets.GOOGLE_CUSTOM_SEARCH_API_KEY }}
61+
FIREBASE_SERVICE_ACCOUNT_KEY: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_QA }}
6362
if: startsWith(github.event.ref, 'refs/tags/') && (contains(github.ref, '-alpha.') || contains(github.ref, '-beta.'))
6463
run: |
64+
printf '%s' "$FIREBASE_SERVICE_ACCOUNT_KEY" > "$RUNNER_TEMP/firebase-key.json"
65+
export GOOGLE_APPLICATION_CREDENTIALS="$RUNNER_TEMP/firebase-key.json"
6566
npm install
6667
make docs
6768
make qa
6869
6970
- name: Release
7071
env:
71-
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
72-
GOOGLE_CUSTOM_SEARCH_API_KEY: ${{ secrets.GOOGLE_CUSTOM_SEARCH_API_KEY }}
72+
FIREBASE_SERVICE_ACCOUNT_KEY: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PROD }}
7373
if: startsWith(github.event.ref, 'refs/tags/') && (contains(github.ref, '-alpha.') || contains(github.ref, '-beta.')) == false
7474
run: |
75+
printf '%s' "$FIREBASE_SERVICE_ACCOUNT_KEY" > "$RUNNER_TEMP/firebase-key.json"
76+
export GOOGLE_APPLICATION_CREDENTIALS="$RUNNER_TEMP/firebase-key.json"
7577
npm install
7678
make docs
7779
make release

0 commit comments

Comments
 (0)