-
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (43 loc) · 1.51 KB
/
nvfetcher.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
# SPDX-FileCopyrightText: 2023 Sefa Eyeoglu <[email protected]>
#
# SPDX-License-Identifier: MIT
name: Update lockfiles
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
update-locks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Set Git user info
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Update flake inputs
run: |
nix flake update --commit-lock-file
- name: Update upstream sources
run: |
# HACK: nvfetcher doesn't delete old extracted files
# See https://github.com/berberman/nvfetcher/issues/111
rm -rfv _sources/*/
nix develop -c nvfetcher --commit-changes
- name: Create PR
id: cpr
uses: peter-evans/create-pull-request@v6
with:
base: "main"
branch: "update-locks"
delete-branch: true
title: "chore: update locks"
body: "Automated pull request to update flake.lock and nvfetcher sources"
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v3
with:
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: merge