CD: Fix non-working limit of jobs

This commit is contained in:
JustArchi
2022-11-16 13:07:21 +01:00
parent 14421b606e
commit 29a3168d49

View File

@@ -199,11 +199,20 @@ jobs:
for variant in $VARIANTS; do
publish "$variant" &
while [ "$(jobs -p | wc -l)" -ge "$MAX_JOBS" ]; do
while :; do
# We can't capture jobs -p result directly in POSIX sh
jobs -p > "/tmp/asf-publish-jobs.txt"
if [ "$(wc -l < "/tmp/asf-publish-jobs.txt")" -lt "$MAX_JOBS" ]; then
break
fi
sleep 1
done
done
rm -f "/tmp/asf-publish-jobs.txt"
wait
- name: Publish ArchiSteamFarm on Windows