Updating firebase authorized domains in a preview environment is a pain. This action will help you to easily add a domain to your firebase project within CI pipeline and have review apps right away after deployment.
- Login to Firebase > Project Settings > Service Accounts
- Click Manage service account permission and go to google cloud console
- Click Create Service Account
- Give a name for your service account
- In Grant this service account access to project section, add Editor and Firebase Admin roles
- Save Service Account
- Go back to Service Accounts Screen
- Click Keys > Add Key > JSON
- Download generated key
- Copy content of Key
- Go to Github and set this Key file content as a secret
- Use it in your action 🚀
- name: Update Firebase Authorized Domains
uses: wavezync/firebase-authorized-domains@v1.0.0
with:
service_account_key_json: ${{ secrets.service_account_key_json }}
domain: "https://example.com"
action: add
- name: Update Firebase Authorized Domains
uses: wavezync/firebase-authorized-domains@v1.0.0
with:
service_account_key_json: ${{ secrets.service_account_key_json }}
domain: "https://example.com"
action: remove
Install the dependencies
$ npm install
Build the typescript and package it for distribution
$ npm run build && npm run package
Actions are run from GitHub repos so we will checkin the packed dist folder.
Then run ncc and push the results:
$ npm run package
$ git add dist
$ git commit -a -m "prod dependencies"
$ git push origin releases/v1
Note: We recommend using the --license
option for ncc, which will create a license file for all of the production node modules used in your project.
Your action is now published! 🚀
See the versioning documentation
After testing you can create a v1 tag to reference the stable and latest V1 action