build.yml: publish the kernel apk last
The publish step uploads one apk at a time, in glob order, and stops at the first failed upload. With the kernel apk before soc-fairphone-fp6-audio in that order, a failure in between would leave the registry serving a kernel without the package that carries its card name's topology and UCM (the combined-stable tip CI builds names the card MILOS-Fairphone-Gen6 since 7.3; only soc-fairphone-fp6-audio >= 5 has those files, and without them that kernel boots with no sound card). Upload everything else first, the kernel last.
This commit is contained in:
parent
66f6e86623
commit
57f4ff9b1e
1 changed files with 21 additions and 9 deletions
|
|
@ -73,21 +73,33 @@ jobs:
|
||||||
fi
|
fi
|
||||||
apk add -q curl
|
apk add -q curl
|
||||||
found=0
|
found=0
|
||||||
for f in /home/build/.local/var/pmbootstrap/packages/*/aarch64/*.apk; do
|
publish() {
|
||||||
[ -e "$f" ] || continue
|
case "$(basename "$1")" in
|
||||||
case "$(basename "$f")" in
|
imsd-*|fingerprintd-*) echo "registry-sourced, not republished: $(basename "$1")"; return 0 ;;
|
||||||
imsd-*|fingerprintd-*) echo "registry-sourced, not republished: $(basename "$f")"; continue ;;
|
libqmi-*|qmi-utils-*) echo "retired fork, not republished: $(basename "$1")"; return 0 ;;
|
||||||
libqmi-*|qmi-utils-*) echo "retired fork, not republished: $(basename "$f")"; continue ;;
|
|
||||||
esac
|
esac
|
||||||
found=1
|
found=1
|
||||||
code=$(curl -s -o /dev/null -w '%{http_code}' \
|
code=$(curl -s -o /dev/null -w '%{http_code}' \
|
||||||
--user "catbot:$PACKAGE_TOKEN" --upload-file "$f" \
|
--user "catbot:$PACKAGE_TOKEN" --upload-file "$1" \
|
||||||
"https://forgejo.catcrafts.net/api/packages/Catcrafts/alpine/edge/fp6")
|
"https://forgejo.catcrafts.net/api/packages/Catcrafts/alpine/edge/fp6")
|
||||||
case "$code" in
|
case "$code" in
|
||||||
201) echo "published: $(basename "$f")" ;;
|
201) echo "published: $(basename "$1")" ;;
|
||||||
409) echo "already published: $(basename "$f")" ;;
|
409) echo "already published: $(basename "$1")" ;;
|
||||||
*) echo "FAILED ($code): $(basename "$f")"; exit 1 ;;
|
*) echo "FAILED ($code): $(basename "$1")"; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
}
|
||||||
|
# The kernel goes last: a publish that fails part-way (the first
|
||||||
|
# failed upload ends this step) must never leave the registry serving
|
||||||
|
# a kernel without the userspace its card name needs - the 7.3 kernel
|
||||||
|
# has its topology and UCM only in soc-fairphone-fp6-audio >= 5.
|
||||||
|
for f in /home/build/.local/var/pmbootstrap/packages/*/aarch64/*.apk; do
|
||||||
|
[ -e "$f" ] || continue
|
||||||
|
case "$(basename "$f")" in linux-postmarketos-qcom-milos-*) continue ;; esac
|
||||||
|
publish "$f"
|
||||||
|
done
|
||||||
|
for f in /home/build/.local/var/pmbootstrap/packages/*/aarch64/linux-postmarketos-qcom-milos-*.apk; do
|
||||||
|
[ -e "$f" ] || continue
|
||||||
|
publish "$f"
|
||||||
done
|
done
|
||||||
[ "$found" = 1 ] || { echo "no packages found to publish"; exit 1; }
|
[ "$found" = 1 ] || { echo "no packages found to publish"; exit 1; }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue