-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (32 loc) · 1.27 KB
/
upgrade.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
name: "Update flake"
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 1' # Every Monday at 00:00 UTC, needs to happen before 3 am CET and CEST
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: "Install Nix"
uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: "accept-flake-config = true"
- uses: cachix/cachix-action@v15
with:
name: juanibiapina
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: "Update flake"
run: "nix flake update --accept-flake-config"
- name: "Build mini configuration"
run: "nix build --accept-flake-config .#nixosConfigurations.mini.config.system.build.toplevel"
- name: "Build desktop configuration"
run: "nix build --accept-flake-config .#nixosConfigurations.desktop.config.system.build.toplevel"
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "auto: Update flake"