oizys/.github/workflows/build.yml

59 lines
1.6 KiB
YAML
Raw Normal View History

2024-01-23 16:09:05 -06:00
name: Build NixOS
2024-01-23 11:51:13 -06:00
on:
push:
branches:
- main
2024-01-23 12:50:48 -06:00
pull_request:
branches:
- main
2024-01-24 00:11:55 -06:00
env:
HOSTS: "algiz othalan mannaz"
2024-01-23 11:51:13 -06:00
jobs:
build:
2024-01-24 00:11:55 -06:00
# strategy:
# matrix:
# hosts: "algiz othalan mannaz"
2024-01-23 16:54:28 -06:00
# try to use the cache here along the way
2024-01-24 00:11:55 -06:00
# fail-fast: true
# max-parallel: 1
2024-01-23 11:51:13 -06:00
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
2024-01-24 12:32:07 -06:00
extra_nix_config: >
trusted-public-keys =
hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=
nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=
daylin.cachix.org-1:fLdSnbhKjtOVea6H9KqXeir+PyhO+sDSPhEW66ClE/k=
cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters =
https://hyprland.cachix.org
https://nixpkgs-wayland.cachix.org
https://daylin.cachix.org
2024-01-24 13:33:48 -06:00
https://cache.nixos.org
2024-01-24 12:32:07 -06:00
2024-01-23 11:51:13 -06:00
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: cachix/cachix-action@v14
with:
name: daylin
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build
2024-01-24 00:20:11 -06:00
shell: bash
2024-01-23 15:50:49 -06:00
run: |
2024-01-24 09:08:55 -06:00
for host in ${HOSTS[@]}
2024-01-24 00:11:55 -06:00
do
2024-01-24 13:33:48 -06:00
./modules/styx/styx cache --host $host --flake .
2024-01-24 00:11:55 -06:00
done
2024-01-24 13:33:48 -06:00
# - name: Push
# env:
# CACHIX_ACTIVATE_TOKEN: "${{ secrets.CACHIX_ACTIVATE_TOKEN }}"
# run: cachix push daylin ./result