From 16b7fbe91cf11e27c95dba82a8a92c9135b0bf43 Mon Sep 17 00:00:00 2001 From: Nafis Zaman Date: Fri, 16 Aug 2024 09:44:00 -0700 Subject: [PATCH] Update cd and config to fix deployment issues --- .eslintrc.js | 1 + .github/workflows/cd.yml | 1 + firebase.json | 3 ++- package.json | 2 +- src/index.ts | 4 ++-- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index b16341a..8a6305f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -28,5 +28,6 @@ module.exports = { "quotes": ["error", "double"], "import/no-unresolved": 0, "indent": ["error", 2], + "object-curly-spacing": ["error", "always"], }, }; diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 919de5c..9040690 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -43,6 +43,7 @@ jobs: with: workload_identity_provider: 'projects/705985154569/locations/global/workloadIdentityPools/kipr-github-identity-pool/providers/github' project_id: 'kipr-321905' + service_account: 'simulator-cloud-functions-gith@kipr-321905.iam.gserviceaccount.com' create_credentials_file: true export_environment_variables: true cleanup_credentials: true diff --git a/firebase.json b/firebase.json index 128ee12..dca31f0 100644 --- a/firebase.json +++ b/firebase.json @@ -3,7 +3,8 @@ "predeploy": [ "yarn --cwd \"$RESOURCE_DIR\" run lint", "yarn --cwd \"$RESOURCE_DIR\" run build" - ] + ], + "source": "." }, "emulators": { "auth": { diff --git a/package.json b/package.json index dc3a3cb..87f9bee 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "logs": "firebase functions:log" }, "engines": { - "node": "18" + "node": "20" }, "main": "lib/index.js", "dependencies": { diff --git a/src/index.ts b/src/index.ts index 5cd3910..a5da3ff 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,6 @@ import { onSchedule } from "firebase-functions/v2/scheduler"; import * as logger from "firebase-functions/logger"; -export const unconsentedUserCleanup = onSchedule("every hour", async (event) => { - logger.info("Hello functions!", { structuredData: true }); +export const testFunction2 = onSchedule("every hour", async () => { + logger.info("Hello functions 2!", { structuredData: true }); });