-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (49 loc) · 1.62 KB
/
update-flake.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: update-flake
on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: "0 19 * * *"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
if: ${{ !env.ACT }}
uses: docker/setup-qemu-action@v3
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable-small
extra_nix_config: |
extra-platforms = aarch64-linux
sandbox = false # can't install in act without this
- name: Set up cachix
uses: cachix/cachix-action@v15
with:
name: eh5
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Update flake.lock
run: nix flake update
- name: Run flake check
run: nix flake check
- name: Build develop profile (x86_64-linux)
run: nix develop .#devShells.x86_64-linux.default --profile dev -c true
- name: Build develop profile (aarch64-linux)
if: ${{ !env.ACT }}
run: timeout 120m nix develop .#devShells.aarch64-linux.default --profile dev-aarch64 -c true
- name: Build home configuration
run: nix build .#homeConfigurations.eh5.activationPackage --no-link
- name: Commit changes
if: ${{ !env.ACT }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
commit_message: "chore: update flake"