From 5f12530d7f9cce7e780061a94cada8518348302a Mon Sep 17 00:00:00 2001 From: BlackAngelTVdev Date: Fri, 4 Dec 2026 12:34:58 +0100 Subject: [PATCH] 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. --- .gitea/workflows/release.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 62cc036..1e49f50 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -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