Skip to content

Latest commit

 

History

History
44 lines (39 loc) · 1.43 KB

README.md

File metadata and controls

44 lines (39 loc) · 1.43 KB

attic-builder

This Program/Script builds a flake and pushes all its dependencies to attic

Usage

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 }}

Setup attic

Setting up Attic is described here: //docs.attic.rs/tutorial.html

Generate a token

atticadm -f /path/to/server.toml --sub 'github' --push 'CACHENAME' --validity '1y'

Known Issues

Future Ideas

  • 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