nrec-actions-runner #47
14
.github/workflows/flake-check.yaml
vendored
14
.github/workflows/flake-check.yaml
vendored
@@ -1,14 +0,0 @@
|
|||||||
name: Run nix flake check
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
flake-check:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: ghcr.io/catthehacker/ubuntu:runner-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: cachix/install-nix-action@v27
|
|
||||||
- run: nix flake check
|
|
||||||
27
.github/workflows/flake-update.yaml
vendored
27
.github/workflows/flake-update.yaml
vendored
@@ -1,27 +0,0 @@
|
|||||||
---
|
|
||||||
name: Periodic flake update
|
|
||||||
on: # yamllint disable-line rule:truthy
|
|
||||||
schedule:
|
|
||||||
- cron: "0 0 * * *"
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
flake-update:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: ghcr.io/catthehacker/ubuntu:runner-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
ref: master
|
|
||||||
- uses: cachix/install-nix-action@v27
|
|
||||||
- name: configure git
|
|
||||||
run: |
|
|
||||||
git config --global user.name 'torjus-bot'
|
|
||||||
git config --global user.email 'torjus-bot@git.t-juice.club'
|
|
||||||
- name: flake update
|
|
||||||
run: nix flake update --commit-lock-file
|
|
||||||
- name: push
|
|
||||||
run: git push
|
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
../../system/packages.nix
|
../../system/packages.nix
|
||||||
|
../../services/actions-runner
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
32
services/actions-runner/default.nix
Normal file
32
services/actions-runner/default.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
virtualisation.podman = {
|
||||||
|
enable = true;
|
||||||
|
dockerCompat = true;
|
||||||
|
dockerSocket.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.gitea-actions-runner = {
|
||||||
|
package = pkgs.forgejo-runner;
|
||||||
|
|
||||||
|
instances.actions1 = {
|
||||||
|
enable = true;
|
||||||
|
name = config.networking.hostName;
|
||||||
|
url = "https://code.t-juice.club";
|
||||||
|
tokenFile = "/var/lib/forgejo-runner/token";
|
||||||
|
labels = [
|
||||||
|
"nix:docker://nixos/nix:latest"
|
||||||
|
"node-bookworm:docker://node:lts-bookworm-slim"
|
||||||
|
"alpine:docker://alpine:latest"
|
||||||
|
];
|
||||||
|
settings = {
|
||||||
|
runner.capacity = 2;
|
||||||
|
cache = {
|
||||||
|
enabled = true;
|
||||||
|
dir = "/var/cache/forgejo-runner";
|
||||||
|
};
|
||||||
|
container.privileged = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user