-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (50 loc) · 1.76 KB
/
update-deps.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
45
46
47
48
49
50
51
52
53
54
name: Update Flakes
on:
schedule:
- cron: "40 0 * * 0"
workflow_dispatch:
jobs:
get-flakes:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.get-flakes.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: generate flake matrix
id: get-flakes
run: |
set -euo pipefail
flakes="$(nix flake metadata --json | jq -rcM '.locks.nodes.root.inputs | {flake: keys}')"
echo "::set-output name=matrix::$flakes"
flake-update:
runs-on: ubuntu-latest
needs:
- get-flakes
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.get-flakes.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
with:
nix_path: nixpkgs=channel:nixos-unstable-small
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: actions/[email protected]
id: generate-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: cpcloud/[email protected]
with:
dependency: ${{ matrix.flake }}
github-token: ${{ secrets.GITHUB_TOKEN }}
pull-request-token: ${{ steps.generate-token.outputs.token }}
pull-request-author: "phillip-ground[bot] <phillip-ground[bot]@users.noreply.github.com>"
pull-request-labels: dependencies,autorebase:opt-in
automerge: true
delete-branch: true