-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (46 loc) · 1.59 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
name: Nix Flake Updater
on:
workflow_dispatch: {}
schedule:
- cron: '0 0 * * *'
jobs:
update-packages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v13
with:
extra-conf: |
accept-flake-config = true
- name: Run the Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v7
- run: |
nix shell nixpkgs#git -c git config user.name 'NixBot'
nix shell nixpkgs#git -c git config user.email '[email protected]'
nix shell .#world -c world gh-release-update
nix flake update
nix shell nixpkgs#git -c git commit -am "[auto] update flake inputs"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
id: cpr
with:
token: ${{ secrets.MACHINE_USER_TOKEN }}
commit-message: '[auto] package updates'
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: automatic-updates
delete-branch: true
title: '[auto] package updates'
body: ''
labels: |
automated pr
assignees: johnae
reviewers: johnae
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v3
with:
token: ${{ secrets.MACHINE_USER_TOKEN }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash