This Program/Script build an flake and pushes all its dependencies to attic
Create .github/workflows/build.yml
in you repo with the following contents:
name: "Build"
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: Svenum/attic-builder@v1
with:
build_systems: true
build_packages: true
attic_url: https://attic.example.tld/
attic_cache: CACHENAME
attic_token: ${{ secrets.ATTIC_TOKEN }}
Setting up Attic is here described: //docs.attic.rs/tutorial.html
atticadm -f /path/to/server.toml --sub 'github' --push 'CACHENAME' --validity '1y'
- On large Flakes the build sometimes is failing 'cause of to little diskspace
- Creating a Docker Container that automatically fetch one or more Repos and build it periotically local
- updating flake with
nix flake update
before run.