Compare commits

..

2 commits

3 changed files with 7 additions and 31 deletions

View file

@ -6,7 +6,7 @@
}: { }: {
# https://forgejo.org/docs/latest/admin/actions/ # https://forgejo.org/docs/latest/admin/actions/
services.gitea-actions-runner = { services.gitea-actions-runner = {
package = pkgs.forgejo-actions-runner; package = pkgs.gitea-actions-runner; # TODO: forgejo
instances."default" = { instances."default" = {
enable = true; enable = true;
name = "default"; name = "default";
@ -15,17 +15,16 @@
tokenFile = config.age.secrets.gitea-actions-runner-token-file.path; tokenFile = config.age.secrets.gitea-actions-runner-token-file.path;
# The Forgejo runner relies on application containers (Docker, Podman, # The Forgejo runner relies on application containers (Docker, Podman,
# etc) to execute a workflow in an isolated environment. Labels are used # etc) to execute a workflow in an isolated environment. Labels are used
# to map jobs' `runs-on` to their runtime environment. Many common # to map jobs' `runs-on` to their runtime environment. Note that changing
# actions require bash, git and nodejs, as well as a filesystem that # these labels requires a new registration token.
# follows the filesystem hierarchy standard.
labels = [ labels = [
"debian-latest:docker://node:20-bullseye" "nixos-latest:docker://nixos/nix:2.21.0"
]; ];
# https://forgejo.org/docs/latest/admin/actions/#configuration # https://forgejo.org/docs/latest/admin/actions/#configuration
settings = { settings = {
runner = { runner = {
# Default fetch interval is 2s -- no need to spam the server # Default fetch interval is 2s -- no need to spam the server
fetch_interval = "5m"; fetch_interval = "1m";
}; };
}; };
}; };
@ -38,3 +37,4 @@
group = "root"; group = "root";
}; };
} }

View file

@ -1,3 +1,3 @@
{...}: { {...}: {
imports = [./forgejo-actions-runner.nix]; imports = [];
} }

View file

@ -1,24 +0,0 @@
{...}: {
# Running containers without /bin/sleep (such as nixos) requires newer
# forgejo act runner. See https://codeberg.org/forgejo/forgejo/issues/2611.
nixpkgs.overlays = [
(final: prev: {
forgejo-actions-runner = prev.callPackage "${prev.path}/pkgs/development/tools/continuous-integration/forgejo-actions-runner" {
buildGoModule = args:
prev.buildGoModule (args
// rec {
version = "3.4.1";
src = prev.fetchFromGitea {
domain = "codeberg.org";
owner = "forgejo";
repo = "runner";
rev = "v${version}";
hash = "sha256-c8heIHt+EJ6LnZT4/6TTWd7v85VRHjH72bdje12un4M=";
};
vendorHash = "sha256-FCCQZdAYRtJR3DGQIEvUzv+1kqvxVTGkwJwZSohq28s=";
});
};
})
];
}