Skip to content

Commit

Permalink
Create .env file locally instead of loading env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
arkadiuszbachorski committed Sep 15, 2024
1 parent 82eb188 commit 8889cdd
Showing 1 changed file with 10 additions and 0 deletions.
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: Create .env file
env:
env-file: ${{ secrets.ENV_FILE }}
if: ${{ env.env-file != '' }}
run: |
echo "${{ env.env-file }}" > ${{ inputs.workingDirectory }}/.env
- name: Run custom command
if: ${{ inputs.customcommand != '' }}
run: ${{ inputs.customcommand }}
Expand Down

0 comments on commit 8889cdd

Please sign in to comment.