Skip to content

Commit 2c86289

Browse files
Refactor Github Action per b/485167538
1 parent a90ebab commit 2c86289

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/android.yml

Lines changed: 9 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 }}
@@ -156,13 +158,15 @@ jobs:
156158
run: |
157159
set -x
158160
python scripts/build_scripts/build_testapps.py --p Android \
159-
--t ${{ needs.check_and_prepare.outputs.apis }} \
161+
--t ${NEEDS_CHECK_AND_PREPARE_OUTPUTS_APIS} \
160162
--output_directory "${{ github.workspace }}" \
161163
--artifact_name "android-${{ matrix.os }}" \
162164
--noadd_timestamp \
163165
--short_output_paths \
164166
--gha_build \
165167
--packaged_sdk /tmp/downloaded_sdk/firebase_cpp_sdk
168+
env:
169+
NEEDS_CHECK_AND_PREPARE_OUTPUTS_APIS: ${{ needs.check_and_prepare.outputs.apis }}
166170

167171
- name: Stats for ccache (mac and linux)
168172
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
@@ -204,6 +208,8 @@ jobs:
204208
shell: bash
205209
run: |
206210
cat build-results-android-${{ matrix.os }}.log
207-
if [[ "${{ job.status }}" != "success" ]]; then
211+
if [[ "${JOB_STATUS}" != "success" ]]; then
208212
exit 1
209213
fi
214+
env:
215+
JOB_STATUS: ${{ job.status }}

0 commit comments

Comments
 (0)