2024-01-23 11:51:13 -06:00
|
|
|
name: Build & Push
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2024-01-23 12:50:48 -06:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2024-01-23 11:51:13 -06:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
host: ["othalan", "algiz"]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-01-23 14:51:12 -06:00
|
|
|
# free up some space
|
2024-01-23 13:10:13 -06:00
|
|
|
- run: sudo rm -rf /opt&
|
2024-01-23 14:51:12 -06:00
|
|
|
|
2024-01-23 11:51:13 -06:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: cachix/install-nix-action@v25 # v25
|
|
|
|
with:
|
|
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
|
|
- uses: DeterminateSystems/magic-nix-cache-action@v2
|
|
|
|
- uses: cachix/cachix-action@v14
|
|
|
|
with:
|
|
|
|
name: daylin
|
|
|
|
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
|
|
|
- name: Build
|
|
|
|
run: nix build '.#nixosConfigurations.${{ matrix.host }}.config.system.build.toplevel'
|
|
|
|
- name: Push
|
|
|
|
env:
|
|
|
|
CACHIX_ACTIVATE_TOKEN: "${{ secrets.CACHIX_ACTIVATE_TOKEN }}"
|
|
|
|
run: cachix push daylin ./result
|