w9jds / firebase-action

GitHub Action for interacting with Firebase
MIT License
923 stars 198 forks source link

feat: GCP_SA_KEY input regex pattern check #115

Closed weilinzung closed 2 years ago

weilinzung commented 2 years ago

This could avoid manually decoding the service account key. And according to Google doc here: https://firebase.google.com/docs/hosting/github-integration, this would automatically add the uncoded key to GitHub secrets at repo level.

Fixes #112 Fixes #104 Fixes #39

weilinzung commented 2 years ago

@w9jds Can you confirm if the latest change would work?

I believe this part is already taken care of multiple of 4 [A-Za-z0-9+/]{4}. And also the original code echo "$GCP_SA_KEY" | base64 -d > /opt/gcp_key.json, just doing simple base64 decoding.

Or provide me the possible fail decoded key for the regex test? 🙏 thanks!