w9jds / firebase-action

GitHub Action for interacting with Firebase
MIT License
927 stars 200 forks source link

Add option to unencoded GCP_SA_KEY format #112

Closed weilinzung closed 3 years ago

weilinzung commented 3 years ago

A base64 encoded private key (json format) for a Service Account with the Firebase Admin role in the project. If you're deploying functions, you would also need the Cloud Functions Developer role. Since the deploy service account is using the App Engine default service account in the deploy process, it also needs the Service Account User role. If you're only doing Hosting, Firebase Hosting Admin is enough.

it is required base64 for the GCP_SA_KEY. if doing firebase init hosting:github, in this way we can't get the servic account key file for encoding. Isn't better by using a raw service account key(json) like google-github-actions/setup-gcloud?

So doesn't have to do this decode again here?

echo "$GCP_SA_KEY" | base64 -d > /opt/gcp_key.json

Thanks!