From 2bc7412e3f0f5281295da55e34ccd72986b126ff Mon Sep 17 00:00:00 2001 From: ta9ma0k <0ismore@gmail.com> Date: Wed, 27 Dec 2023 15:45:40 +0900 Subject: [PATCH 1/3] use GOOGLE_APPLICATION_CREDENTIALS --- README.md | 2 ++ entrypoint.sh | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c7d9996..0e9ebbb 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,8 @@ _**Response has been removed for now as it caused loads of issues in the bash sc * `FIREBASE_TOKEN` - **Required if GCP_SA_KEY is not set**. _**This method will soon be deprecated, use `GCP_SA_KEY` instead**_. The token to use for authentication. This token can be aquired through the `firebase login:ci` command. +* `GOOGLE_APPLICATION_CREDENTIALS` + * `PROJECT_ID` - **Optional**. To specify a specific project to use for all commands. Not required if you specify a project in your `.firebaserc` file. If you use this, you need to give `Viewer` permission roles to your service account otherwise the action will fail with authentication errors. * `PROJECT_PATH` - **Optional**. The path to the folder containing `firebase.json` if it doesn't exist at the root of your repository. e.g. `./my-app`. diff --git a/entrypoint.sh b/entrypoint.sh index b3042a3..20249e5 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,8 +2,8 @@ set -e -if [ -z "$FIREBASE_TOKEN" ] && [ -z "$GCP_SA_KEY" ]; then - echo "Either FIREBASE_TOKEN or GCP_SA_KEY is required to run commands with the firebase cli" +if [ -z "$FIREBASE_TOKEN" ] && [ -z "$GCP_SA_KEY" ] && [ -z "$GOOGLE_APPLICATION_CREDENTIALS" ]; then + echo "Either FIREBASE_TOKEN or GCP_SA_KEY or GOOGLE_APPLICATION_CREDENTIALS is required to run commands with the firebase cli" exit 126 fi From 4f5ee6ee02982698bf2de01384b351a4e70542f8 Mon Sep 17 00:00:00 2001 From: ta9ma0k <0ismore@gmail.com> Date: Thu, 28 Dec 2023 10:30:57 +0900 Subject: [PATCH 2/3] add GOOGLE_APPLICATION_CREDENTIALS document --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e9ebbb..8b39630 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,8 @@ _**Response has been removed for now as it caused loads of issues in the bash sc * `FIREBASE_TOKEN` - **Required if GCP_SA_KEY is not set**. _**This method will soon be deprecated, use `GCP_SA_KEY` instead**_. The token to use for authentication. This token can be aquired through the `firebase login:ci` command. -* `GOOGLE_APPLICATION_CREDENTIALS` +* `GOOGLE_APPLICATION_CREDENTIALS` - **Required if GCP_SA_KEY or FIREBASE_TOKEN is not set**.the location of a credential JSON file. + * For more details: https://cloud.google.com/docs/authentication/application-default-credentials#GAC * `PROJECT_ID` - **Optional**. To specify a specific project to use for all commands. Not required if you specify a project in your `.firebaserc` file. If you use this, you need to give `Viewer` permission roles to your service account otherwise the action will fail with authentication errors. From df8ea39efebf2c6f478e6159b42d0116ac379a46 Mon Sep 17 00:00:00 2001 From: ta9ma0k <0ismore@gmail.com> Date: Thu, 28 Dec 2023 10:32:21 +0900 Subject: [PATCH 3/3] fix README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 8b39630..62a790c 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,7 @@ _**Response has been removed for now as it caused loads of issues in the bash sc * `FIREBASE_TOKEN` - **Required if GCP_SA_KEY is not set**. _**This method will soon be deprecated, use `GCP_SA_KEY` instead**_. The token to use for authentication. This token can be aquired through the `firebase login:ci` command. -* `GOOGLE_APPLICATION_CREDENTIALS` - **Required if GCP_SA_KEY or FIREBASE_TOKEN is not set**.the location of a credential JSON file. - * For more details: https://cloud.google.com/docs/authentication/application-default-credentials#GAC +* `GOOGLE_APPLICATION_CREDENTIALS` - **Required if GCP_SA_KEY or FIREBASE_TOKEN is not set**. the location of a credential JSON file. For more details: https://cloud.google.com/docs/authentication/application-default-credentials#GAC * `PROJECT_ID` - **Optional**. To specify a specific project to use for all commands. Not required if you specify a project in your `.firebaserc` file. If you use this, you need to give `Viewer` permission roles to your service account otherwise the action will fail with authentication errors.