-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attic build GitHub Action #171
Comments
Hi, I have build something similar with https://github.com/jzbor/nix-flake-workflow. Although this is currently mostly for my personal use and may change over time. But feel free to use it as inspiration or with a pinned commit. |
my personal approach: env:
ATTIC_SERVER: "https://my.attic.com/"
ATTIC_CACHE: "default"
jobs:
myjob:
steps:
- name: Install Attic and nix-fast-build
shell: bash
run: |
nix profile install nixpkgs#attic-client github:Mic92/nix-fast-build/8e7c9d7
- name: Configure Attic
shell: bash
run: |
attic login --set-default central "$ATTIC_SERVER" "$ATTIC_TOKEN"
attic use "$ATTIC_CACHE"
env:
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
- name: Build
shell: bash
run: |
nix-fast-build --eval-workers 1 --skip-cached --no-nom --attic-cache=$ATTIC_CACHE \
-f .#myPackage
# OR, ALTERNATIVELY:
nix build .#myPackage
attic push $ATTIC_CACHE result
You can package this as a composite action (my example here) |
My builder has now reached version 2. with a Docker that can periodically pull an GitHub repo, to build and push the content. https://github.com/Svenum/attic-builder |
Hi,
I like to let you know that I am currently working on an GitHub Action to bild a hole Flake (Packages and nixosConfigurations) to push them to you own Attic instance.
So that you can periodically or on every push build your config and cache the result in your Attic Cache.
As I have not much experience with GitHub Actions I appreciate every help form you guys. 😄
ULR: https://github.com/Svenum/attic-builder
The text was updated successfully, but these errors were encountered: