-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (52 loc) · 1.95 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
51
52
53
54
55
56
57
58
59
name: Nix Autoupdater
on:
workflow_dispatch: {}
schedule:
- cron: '0 0 * * *'
jobs:
update-packages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
accept-flake-config = true
- name: Run the Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v2
- run: |
nix shell nixpkgs#git -c git config user.name 'NixBot'
nix shell nixpkgs#git -c git config user.email '[email protected]'
## by building this we can rely on it not being affected by
## the flake being in some invalid state during updates
nix build .#world-updaters
./result/bin/update-github-release-flake-inputs ${{ secrets.GITHUB_TOKEN }}
nix flake update
./result/bin/update-all-cargo-vendor-shas
./result/bin/update-all-fixed-output-derivation-shas
nix shell nixpkgs#git -c git commit -am "[Auto] update all inputs"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
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: package-auto-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