Skip to content

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

License

Notifications You must be signed in to change notification settings

Svenum/attic-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages