-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (54 loc) · 1.98 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
53
54
55
56
---
name: Update nvfetcher
on:
workflow_dispatch: {}
schedule:
- cron: "0 2 * * *" # Every night at 0200
push:
paths:
- pkgs/nvfetcher.toml
jobs:
update-nvfetcher:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: cachix/install-nix-action@9f70348d77d0422624097c4b7a75563948901306 # v29
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: workflow/[email protected]
id: update_nvfetcher
with:
packages: nvfetcher
script: |
cd pkgs
echo "OUTPUT<<EOF" >> $GITHUB_OUTPUT
echo "$(nvfetcher | sed -n '/Changes/,/$!d/p')" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Generate token
uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.generate-token.outputs.token }}
title: "chore(deps): update packages managed by nvfetcher"
commit-message: "chore(deps): update packages managed by nvfetcher"
delete-branch: true
labels: nvfetcher
committer: ro-bott <151924872+ro-bott[bot]@users.noreply.github.com>
author: ro-bott <151924872+ro-bott[bot]@users.noreply.github.com>
body: |
${{ steps.update_nvfetcher.outputs.OUTPUT }}
- name: Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v3
with:
token: ${{ steps.generate-token.outputs.token }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash