Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the Ability to Inject Environment Variables #82

Closed
wants to merge 7 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/firebase-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ on:
You can lean more about how to generate the JSON at https://cloud.google.com/iam/docs/service-accounts-create.
The service account must have the minimally required permissions documented at https://firebase.google.com/docs/projects/iam/permissions.
required: true
ENV_FILE:
description: |
.env file that is injected in the build context before doing the firebase deployment.
required: false

jobs:
deployfirebase:
Expand All @@ -75,6 +79,12 @@ jobs:
java-version: '17'
- name: Install Firebase CLI Tools
run: npm install -g firebase-tools
- name: Load All Environment Variables
env:
env-file: ${{ secrets.ENV_FILE }}
if: ${{ env.env-file != '' }}
run: |
export $("${{ secrets.ENV_FILE }}" | xargs)
- name: Run custom command
if: ${{ inputs.customcommand != '' }}
run: ${{ inputs.customcommand }}
Expand Down
Loading