-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.24 KB
/
flake-update.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
name: Update dependencies
on:
schedule:
- cron: "0 14 * * 1,3,5"
workflow_dispatch:
push:
branches:
- main
jobs:
niv_update:
name: Update dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ssh-key: ${{ secrets.FLAKE_UPDATE_SSH_KEY }}
- uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v27
with:
extra_nix_config: access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Flake update
run: |
git config user.name github-actions
git config user.email [email protected]
nix flake update --commit-lock-file
- uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
id: create-pr
name: Create PR
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: flake-update
title: Automated flake update
- name: Set auto merge
if: ${{ steps.create-pr.outputs.pull-request-number }}
run: |
gh pr merge --merge --auto ${{ steps.create-pr.outputs.pull-request-number }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}