Skip to content

Commit eca782a

Browse files
committed
ci: add update flake workflow
1 parent ac10667 commit eca782a

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/update.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Update Flake
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "43 3 */10 * *" # run every ten days at 3:43 am
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
update:
14+
name: "nix flake update"
15+
runs-on: ubuntu-24.04
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
20+
with:
21+
fetch-depth: 0
22+
23+
- uses: DeterminateSystems/nix-installer-action@c5a866b6ab867e88becbed4467b93592bce69f8a # v21
24+
25+
- name: nix flake update
26+
run: |
27+
git config user.name 'github-actions[bot]'
28+
git config user.email 'github-actions[bot]@users.noreply.github.com'
29+
30+
git branch -f update origin/main
31+
git checkout update
32+
33+
nix flake update --commit-lock-file
34+
35+
git log
36+
37+
git push origin update
38+
39+
- name: Create Pull Request
40+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
41+
with:
42+
title: Update Flake
43+
branch: update
44+
base: main

0 commit comments

Comments
 (0)