-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (33 loc) · 1.3 KB
/
flake.yml
File metadata and controls
41 lines (33 loc) · 1.3 KB
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: Auto update flake.lock
on:
workflow_dispatch:
schedule:
# Update every 6 hour
- cron: "0 */6 * * *"
jobs:
update_flake:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- name: Install latest nix
uses: cachix/install-nix-action@v18
with:
extra_nix_config: |
substituters = https://cache.nixos.org https://nix-community.cachix.org https://fog.cachix.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= fog.cachix.org-1:FAxiA6qMLoXEUdEq+HaT24g1MjnxdfygrbrLDBp6U/s=
nix_path: nixpkgs=channel:nixos-unstable
- name: Setup nix drv cache
uses: cachix/cachix-action@v12
with:
name: fog
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Quick eval
run: nix develop --show-trace --print-build-logs --command evalnix
- name: Setup github action git cred
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name github-actions
- name: Update flake.lock
run: nix flake update --commit-lock-file
- name: Push changes to main
run: git pull --rebase --autostash && git push