Compare commits

...

3 Commits

Author SHA1 Message Date
teutat3s 9541e5029e
flora-6: move forgejo-runner cache directory to /data
Flake checks / Check (pull_request) Successful in 13m34s Details
2024-04-23 15:12:11 +02:00
teutat3s c4d0d34807
ci: revert cache-nix-action to version 4.0.3 2024-04-23 15:12:06 +02:00
teutat3s d5fe65b60d
ci: disable cachix daemon, spams logs with
[2024-04-22 23:46:26][Info] Skipping /nix/store/w2zp8k8yy2avv5r92w0cpq9aixkir2sp-LocalSettings.php
...
2024-04-23 15:11:59 +02:00
2 changed files with 30 additions and 3 deletions

View File

@ -24,22 +24,37 @@ jobs:
echo "hash=$(md5sum flake.lock | awk '{print $1}')" >> $GITHUB_OUTPUT
- name: Restore and cache Nix store
uses: https://github.com/nix-community/cache-nix-action@v5
uses: https://github.com/nix-community/cache-nix-action@v4.0.3
id: nix-store-cache
with:
primary-key: cache-${{ runner.os }}-nix-store-${{ steps.flake-lock-hash.outputs.hash }}
restore-prefixes-first-match: |
key: cache-${{ runner.os }}-nix-store-${{ steps.flake-lock-hash.outputs.hash }}
restore-keys: |
cache-${{ runner.os }}-nix-store-
gc-linux: true
gc-max-store-size-linux: 10000000000
purge-caches: true
purge-key: cache-${{ runner.os }}-nix-store-
purge-created: true
purge-created-max-age: 42
- name: Prepare cachix
uses: https://github.com/cachix/cachix-action@v14
with:
name: pub-solar
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
useDaemon: false
- name: Run flake checks
run: |
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' flake check
# Prevent cache garbage collection
for target in $(nix flake show --json --all-systems | jq '
.["nixosConfigurations"] |
to_entries[] |
.key
' | tr -d '"'
); do
nix profile install --profile "/nix/var/nix/profiles/$target" ".#nixosConfigurations.${target}.config.system.build.toplevel"
done

View File

@ -13,6 +13,9 @@
# Needed for the docker runner to communicate with the act_runner cache
networking.firewall.trustedInterfaces = [ "br-+" ];
systemd.services."gitea-runner-flora\\x2d6".serviceConfig = {
CacheDirectory = "/data/gitea-actions-runner";
};
# forgejo actions runner
# https://forgejo.org/docs/latest/admin/actions/
# https://docs.gitea.com/usage/actions/quickstart
@ -23,6 +26,15 @@
name = config.networking.hostName;
url = "https://git.pub.solar";
tokenFile = config.age.secrets.forgejo-actions-runner-token.path;
settings = {
cache = {
enabled = true;
dir = "/data/gitea-actions-runner/actcache";
host = "";
port = 0;
external_server = "";
};
};
labels = [
# provide a debian 12 bookworm base with Node.js for actions
"debian-latest:docker://git.pub.solar/pub-solar/actions-base-image:20-bookworm"