fix: propagate errors from parallel downloads in res-update-game workflow (#14794)

* Initial plan

* fix: properly handle errors in parallel downloads for stages.json

Co-authored-by: AnnAngela <9762652+AnnAngela@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: AnnAngela <9762652+AnnAngela@users.noreply.github.com>
This commit is contained in:
Copilot
2025-11-24 09:30:03 +01:00
committed by GitHub
parent 95133cfeae
commit a778ff84d9

View File

@@ -107,6 +107,7 @@ jobs:
parameters=("CN" "US" "JP" "KR")
pids=()
for param in "${parameters[@]}"; do
{
if curl -f -s -o "stages_${param}.json" "${baseUrl}${param}"; then
@@ -116,8 +117,20 @@ jobs:
exit 1
fi
} &
pids+=($!)
done
wait
failed=0
for pid in "${pids[@]}"; do
if ! wait "$pid"; then
failed=1
fi
done
if [ $failed -ne 0 ]; then
echo "One or more downloads failed" >&2
exit 1
fi
- name: Upload Taiwan resources
uses: actions/upload-artifact@v5