-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (36 loc) · 1.14 KB
/
update-flake-lock.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
name: Update Nix Flake lockfile
on:
# Enable option to manually run the action:
workflow_dispatch:
# Run every Sunday:
schedule:
- cron: 0 0 * * 0
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v13
with:
extra-conf:
accept-flake-config = true
- name: Run `nix flake update`
id: update-lockfile
run: ./scripts/commit_flake_update.bash
- uses: tibdex/[email protected]
id: generate-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Create Pull Request
if: ${{ hashFiles('commit_msg_body.txt') != '' }}
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.generate-token.outputs.token }}
title: 'Update Nix Flake lockfile'
body-path: commit_msg_body.txt
branch: 'create-pull-request/update-flake-lockfile'
delete-branch: true
branch-suffix: timestamp
add-paths: flake.lock