diff --git a/nix/modules/hive-forge.nix b/nix/modules/hive-forge.nix index 538ae634..d81921a8 100644 --- a/nix/modules/hive-forge.nix +++ b/nix/modules/hive-forge.nix @@ -324,6 +324,24 @@ in pkgs.gnupg ]; + # Forgejo's local Actions-artifact storage defaults to + # `{APP_DATA_PATH}/actions_artifacts` (= + # `/var/lib/forgejo/data/actions_artifacts`), but Forgejo does not + # pre-create that directory. The artifact endpoint ingests the + # chunked upload, then the merge-chunks step does an `lstat` on a + # tmp dir under it and fails: + # Error merge chunks: lstat + # /var/lib/forgejo/data/actions_artifacts/tmpNNN: no such file or + # directory + # so every `upload-artifact` step dies after the build succeeds. + # Pre-create the dir (forgejo-owned) so uploads actually persist. + # `actions.ENABLED = true` registers the endpoints; this gives them + # somewhere to write. + systemd.tmpfiles.rules = [ + "d /var/lib/forgejo/data 0750 forgejo forgejo - -" + "d /var/lib/forgejo/data/actions_artifacts 0750 forgejo forgejo - -" + ]; + # Ensure Forgejo has a usable GPG signing key so UI merges / CRUD # commits are signed instead of erroring "does not have a signing # key". This service (a) generates a key in forgejo's persistent