From fc820268ce12ac72a7bcff065c95cc24b5755ad9 Mon Sep 17 00:00:00 2001 From: jeffplays2005 Date: Sat, 5 Oct 2024 15:12:18 +1300 Subject: [PATCH] Update secret used in scipt and use VITE_FIREBASE_API_KEY instead of API_KEY --- .github/workflows/update_google_sheet_members.yml | 1 + server/tooling/update-google-sheet-members.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update_google_sheet_members.yml b/.github/workflows/update_google_sheet_members.yml index 1c7283fc..2abb5c69 100644 --- a/.github/workflows/update_google_sheet_members.yml +++ b/.github/workflows/update_google_sheet_members.yml @@ -11,6 +11,7 @@ env: GOOGLE_SHEET_ID: ${{secrets.GOOGLE_SHEET_ID}} GOOGLE_SERVICE_ACCOUNT_JSON: ${{secrets.GOOGLE_SERVICE_ACCOUNT_JSON}} VITE_BACKEND_BASE_URL: ${{secrets.VITE_BACKEND_BASE_URL}} + API_KEY: ${{secrets.VITE_FIREBASE_API_KEY}} jobs: update_google_sheet_members: diff --git a/server/tooling/update-google-sheet-members.ts b/server/tooling/update-google-sheet-members.ts index 16296796..698280d9 100644 --- a/server/tooling/update-google-sheet-members.ts +++ b/server/tooling/update-google-sheet-members.ts @@ -79,7 +79,9 @@ async function getAllUsers(token: string): Promise { * @returns The google auth client */ async function authenticateGoogle(): Promise { - const { client_email, private_key } = JSON.parse(process.env.GOOGLE_API_JSON) + const { client_email, private_key } = JSON.parse( + process.env.GOOGLE_SERVICE_ACCOUNT_JSON + ) const auth = new google.auth.GoogleAuth({ credentials: { client_email,