workflow: use attic cache for packages too
This commit is contained in:
parent
7a971e519a
commit
8209ff70ff
2 changed files with 26 additions and 7 deletions
|
@ -70,6 +70,9 @@ jobs:
|
|||
|
||||
- run: |
|
||||
nix build -L .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel
|
||||
|
||||
- name: cache result
|
||||
run: |
|
||||
nix run github:zhaofengli/attic push main result
|
||||
|
||||
build-homes:
|
||||
|
@ -126,4 +129,7 @@ jobs:
|
|||
|
||||
- run: |
|
||||
nix build -L .#homeConfigurations."${{ matrix.home }}".activationPackage
|
||||
|
||||
- name: cache result
|
||||
run: |
|
||||
nix run github:zhaofengli/attic push main result
|
||||
|
|
25
.github/workflows/build-packages.yml
vendored
25
.github/workflows/build-packages.yml
vendored
|
@ -6,6 +6,17 @@ on:
|
|||
description: "package to build"
|
||||
required: false
|
||||
type: string
|
||||
env:
|
||||
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
|
||||
NIX_CONFIG: |
|
||||
show-trace = true
|
||||
extra-substituters = https://cache.cy7.sh/main
|
||||
extra-trusted-public-keys = main:Ku31HoEWcBtfggge2VGj+QTkVrQuIwRIMGyfV/5VQP0=
|
||||
experimental-features = nix-command flakes
|
||||
extra-experimental-features = nix-command flakes
|
||||
accept-flake-config = true
|
||||
TERM: ansi
|
||||
|
||||
jobs:
|
||||
build-packages:
|
||||
strategy:
|
||||
|
@ -18,6 +29,7 @@ jobs:
|
|||
- ubuntu-24.04-arm
|
||||
- macos-latest
|
||||
- macos-13
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Install Nix
|
||||
|
@ -28,11 +40,12 @@ jobs:
|
|||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: cachix/cachix-action@v14
|
||||
with:
|
||||
name: cything
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
useDaemon: false
|
||||
installCommand: nix profile install nixpkgs#cachix
|
||||
- name: setup attic
|
||||
run: |
|
||||
nix run github:zhaofengli/attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
||||
|
||||
- run: nix build -L ${{ matrix.package }}
|
||||
|
||||
- name: cache result
|
||||
run: |
|
||||
nix run github:zhaofengli/attic push main result
|
Loading…
Add table
Add a link
Reference in a new issue