-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: "Generate Firebase Options" | ||
description: "Generate Firebase Options" | ||
inputs: | ||
firebase_service_account_json: | ||
description: 'Firebase service account JSON' | ||
required: true | ||
firebase_project_id: | ||
description: 'Firebase project ID' | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Configure Firebase Credentials | ||
shell: bash | ||
run: | | ||
echo "${{ inputs.firebase_service_account_json }}" > service_account.json | ||
export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/service_account.json | ||
- name: Debug Environment Variables | ||
shell: bash | ||
run: | | ||
echo "Current working directory: $(pwd)" | ||
env | grep GOOGLE_APPLICATION_CREDENTIALS | ||
ls -l | ||
cat service_account.json | ||
- name: Test Firebase Authentication | ||
shell: bash | ||
run: firebase projects:list --project ${{ inputs.firebase_project_id }} | ||
|
||
- name: Generate Options File | ||
shell: bash | ||
run: | | ||
firebase use ${{ inputs.firebase_project_id }} --non-interactive | ||
firebase apps:sdks --platform=android,ios,web > lib/firebase_options.dart | ||
- name: Clean up | ||
shell: bash | ||
if: always() | ||
run: rm service_account.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters