Skip to content

Commit

Permalink
Include custom firebase json path option
Browse files Browse the repository at this point in the history
  • Loading branch information
nriedman committed Sep 3, 2024
1 parent 59f548a commit fe30850
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/xcodebuild-or-fastlane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ on:
required: false
type: boolean
default: false
firebasejsonpath:
description: |
Path to the firebase.json file that is used to configure the Firebase Emulator.
Defaults to './firebase.json' in the root directory.
required: false
type: string
default: ''
customfirebaseemulatorcommand:
description: |
A custom command that should be run right before executing the fastlane command.
Expand Down Expand Up @@ -379,14 +386,21 @@ jobs:
export GOOGLE_APPLICATION_CREDENTIALS="$RUNNER_TEMP/google-application-credentials.json"
echo "Stored the Google application credentials at $GOOGLE_APPLICATION_CREDENTIALS"
# Use the custom path to the firebase.json file if provided.
if [ -n "${{ inputs.firebasejsonpath }}" ]; then
firebaseJSONPath = ${{ inputs.firebasejsonpath }}
else
firebaseJSONPath = "./firebase.json"
fi
if [ -n "${{ inputs.firebaseemulatorimport }}" ]; then
echo "Importing firebase emulator data from ${{ inputs.firebaseemulatorimport }}"
firebase emulators:exec --import=${{ inputs.firebaseemulatorimport }} 'fastlane ${{ inputs.fastlanelane }}'
firebase emulators:exec -c firebaseJSONPath --import=${{ inputs.firebaseemulatorimport }} 'fastlane ${{ inputs.fastlanelane }}'
else
if [ -n "${{ inputs.customfirebaseemulatorcommand }}" ]; then
firebase emulators:exec '${{ inputs.customfirebaseemulatorcommand }} && fastlane ${{ inputs.fastlanelane }}'
firebase emulators:exec -c firebaseJSONPath '${{ inputs.customfirebaseemulatorcommand }} && fastlane ${{ inputs.fastlanelane }}'

Check warning on line 401 in .github/workflows/xcodebuild-or-fastlane.yml

View workflow job for this annotation

GitHub Actions / YAML Lint Check

401:151 [line-length] line too long (152 > 150 characters)
else
firebase emulators:exec 'fastlane ${{ inputs.fastlanelane }}'
firebase emulators:exec -c firebaseJSONPath 'fastlane ${{ inputs.fastlanelane }}'
fi
fi
else
Expand Down

0 comments on commit fe30850

Please sign in to comment.