-
Notifications
You must be signed in to change notification settings - Fork 12
48 lines (45 loc) · 1.45 KB
/
update-flakes.yaml
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
name: update-flakes
on:
schedule:
- cron: '*/120 * * * *'
workflow_dispatch:
permissions: {}
jobs:
get-flake-inputs:
runs-on: ubuntu-latest
outputs:
flake-inputs: ${{ steps.get-flake-inputs.outputs.flake-inputs }}
steps:
- uses: actions/checkout@v4
with:
lfs: false
sparse-checkout: flake.lock
- id: get-flake-inputs
run: |
flake_inputs="$(jq -c '.nodes.root.inputs | {flake: keys}' flake.lock)"
echo "flake-inputs=${flake_inputs}" >> "$GITHUB_OUTPUT"
update-flake:
name: update-${{ matrix.flake }}
runs-on: ubuntu-latest
needs: get-flake-inputs
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.get-flake-inputs.outputs.flake-inputs) }}
steps:
- uses: actions/checkout@v4
with:
lfs: false
- uses: DeterminateSystems/nix-installer-action@v15
with:
extra-conf: accept-flake-config = true
- run: git config --global user.email "hatesegfault@protonmail.ch"
- run: git config --global user.name "hatesegfault"
- uses: cpcloud/flake-update-action@v2.0.1
with:
dependency: ${{ matrix.flake }}
pull-request-token: ${{ secrets.PAT }}
pull-request-author: hatesegfault <hatesegfault@protonmail.ch>
delete-branch: true
github-token: ${{ secrets.GITHUB_TOKEN }}
pull-request-branch-prefix: update-
automerge: true