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