Compare commits
3 Commits
59b9c8f89d
...
9541e5029e
Author | SHA1 | Date |
---|---|---|
teutat3s | 9541e5029e | |
teutat3s | c4d0d34807 | |
teutat3s | d5fe65b60d |
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue