ci(release): install mkarchiso's host tools and hand back the workspace

The first real build on the org runner validated nothing: mkarchiso refuses to
run when grub-install, mkfs.fat or mcopy are missing from the host. Those three
packages are now installed before the build, and the workspace is chowned back
to the runner afterwards so a root-owned build tree cannot break the next
checkout.
This commit is contained in:
BlackAngelTV committed 2026-12-04 12:34:58 +01:00
1 parent f69ebd2f4b
commit 5f12530d7f
1 file changed
+19
+19
View File
@@ -75,6 +75,15 @@ jobs:
[ "$(id -u)" -eq 0 ] || sudo -n true 2>/dev/null \
|| { echo "::error::mkarchiso exige root (job root ou sudo sans mot de passe)"; exit 1; }
- name: Dépendances de l'hôte (mkarchiso)
if: steps.check.outputs.publish == 'true' || inputs.build_only
run: |
# mkarchiso validates the host tools of every boot mode of the
# profile and aborts otherwise: grub-install (uefi.grub), mkfs.fat
# (dosfstools) and mcopy (mtools). --needed: no-op once present.
SUDO=(); [ "$(id -u)" -eq 0 ] || SUDO=(sudo)
"${SUDO[@]}" pacman -S --needed --noconfirm --quiet grub dosfstools mtools
- name: Build officiel et publication
if: steps.check.outputs.publish == 'true' || inputs.build_only
env:
@@ -105,3 +114,13 @@ jobs:
echo ""
echo "ISO : $(ls -1t out/v*/v*/*.iso 2>/dev/null | head -1)"
} >> "${GITHUB_STEP_SUMMARY}"
- name: Rendre le workspace au runner
if: always()
run: |
# The build runs as root: its artifacts stay root-owned in the
# workspace, and act_runner then fails to clean it up and cannot check
# the repository out for the next run. Hand them back unconditionally.
SUDO=(); [ "$(id -u)" -eq 0 ] || SUDO=(sudo)
"${SUDO[@]}" chown -R "$(id -u):$(id -g)" . 2>/dev/null || true
rm -rf out