-
Notifications
You must be signed in to change notification settings - Fork 92
38 lines (35 loc) · 1.06 KB
/
update-flake.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
name: Update flake dependencies
on:
workflow_dispatch: # for allowing manual triggers of the workflow
schedule:
- cron: '37 16 3,18 * *'
permissions:
contents: read
jobs:
update-and-push-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@V27
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v15
with:
name: crane
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Update flake.lock
id: flakeupdate
uses: DeterminateSystems/update-flake-lock@v23
with:
token: ${{ secrets.PAT_FLAKE_UPDATE }}
branch: "automation/flake-update"
pr-title: "Update flake.lock"
pr-labels: |
automated
dependencies
flake update
- name: Enable Pull Request Automerge
run: gh pr merge --squash --delete-branch --auto ${{ steps.flakeupdate.outputs.pull-request-number }}
env:
GH_TOKEN: ${{ secrets.PAT_FLAKE_UPDATE }}