Skip to content

Commit 5a4d07b

Browse files
authored
Merge pull request #164 from firebase/lsc-1771431432.2430918
Refactor Github Action per b/485167538
2 parents a90ebab + fc0b939 commit 5a4d07b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/android.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ jobs:
3030
- id: set_outputs
3131
run: |
3232
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
33-
apis="${{ github.event.inputs.apis }}"
33+
apis="${GITHUB_EVENT_INPUTS_APIS}"
3434
else
3535
apis="analytics,auth,database,dynamic_links,firestore,functions,gma,messaging,remote_config,storage"
3636
fi
3737
echo apis: ${apis}
3838
echo "::set-output name=apis::${apis}"
39+
env:
40+
GITHUB_EVENT_INPUTS_APIS: ${{ github.event.inputs.apis }}
3941

4042
build:
4143
name: android-${{ matrix.os }}-${{ matrix.architecture }}-${{ matrix.python_version }}
@@ -155,14 +157,17 @@ jobs:
155157
shell: bash
156158
run: |
157159
set -x
160+
CLEAN_APIS=$(echo ${NEEDS_CHECK_AND_PREPARE_OUTPUTS_APIS} | tr -d "'" | tr -d "\"")
158161
python scripts/build_scripts/build_testapps.py --p Android \
159-
--t ${{ needs.check_and_prepare.outputs.apis }} \
162+
--t ${CLEAN_APIS} \
160163
--output_directory "${{ github.workspace }}" \
161164
--artifact_name "android-${{ matrix.os }}" \
162165
--noadd_timestamp \
163166
--short_output_paths \
164167
--gha_build \
165168
--packaged_sdk /tmp/downloaded_sdk/firebase_cpp_sdk
169+
env:
170+
NEEDS_CHECK_AND_PREPARE_OUTPUTS_APIS: ${{ needs.check_and_prepare.outputs.apis }}
166171

167172
- name: Stats for ccache (mac and linux)
168173
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
@@ -204,6 +209,8 @@ jobs:
204209
shell: bash
205210
run: |
206211
cat build-results-android-${{ matrix.os }}.log
207-
if [[ "${{ job.status }}" != "success" ]]; then
212+
if [[ "${JOB_STATUS}" != "success" ]]; then
208213
exit 1
209214
fi
215+
env:
216+
JOB_STATUS: ${{ job.status }}

0 commit comments

Comments
 (0)