This Program/Script builds a flake and pushes all its dependencies to attic
Create .github/workflows/build.yml
in your 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 described here: //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'
- Workaround: Use self-hosted GitHub runner.
- Creating a Docker Container that automatically fetches one or more Repos and builds it localy periodically
- optionally updating flake with
nix flake update
before run. - Rewrite in pyhton