forked from Bos55/nix-config
ci(actions): Update build workflow to push to Attic
This commit is contained in:
parent
b0d5c0da04
commit
21ff5d1868
1 changed files with 8 additions and 2 deletions
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
|
|
@ -12,7 +12,7 @@ jobs:
|
|||
hosts: ${{ steps.hosts.outputs.hostnames }}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: https://github.com/cachix/install-nix-action@v31
|
||||
- uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- name: "Determine hosts"
|
||||
|
|
@ -34,10 +34,16 @@ jobs:
|
|||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: https://github.com/cachix/install-nix-action@v31
|
||||
- uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- name: "Build host"
|
||||
run: |
|
||||
nix build ".#nixosConfigurations.${{ matrix.hostname }}.config.system.build.toplevel" --verbose
|
||||
- name: "Push to Attic"
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
nix profile install nixpkgs#attic-client
|
||||
attic login homelab http://192.168.0.25:8080 "${{ secrets.ATTIC_TOKEN }}"
|
||||
attic push homelab result
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue