generated from nix-community/nur-packages-template
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (56 loc) · 1.99 KB
/
auto-update.yml
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: "Auto update packages"
on:
schedule:
- cron: '18 6 * * *'
workflow_dispatch:
jobs:
auto-update:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: master
ssh-key: ${{ secrets.SSH_DEPLOY_PRIVATE_KEY }}
- name: Install nix
uses: cachix/install-nix-action@V28
with:
nix_path: "nixpkgs=channel:nixos-unstable"
extra_nix_config: |
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Setup magic nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Show nixpkgs version
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
- name: Install essential packages
run: nix profile install nixpkgs#nix-eval-jobs nixpkgs#jq
- name: Update packages
env:
XDG_RUNTIME_DIR: ${{ github.workspace }}
GIT_AUTHOR_NAME: AtaraxiaSjel (bot)
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: AtaraxiaSjel (bot)
GIT_COMMITTER_EMAIL: [email protected]
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NIXPKGS_ALLOW_UNFREE: 1
NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM: 1
timeout-minutes: 30
continue-on-error: true
run: nix eval --json --impure --expr '(import ./ci.nix {}).updatablePkgsNames' | jq '.[]' | xargs -L1 ./update.py --commit --package
- name: Check evaluation
env:
NIXPKGS_ALLOW_UNFREE: 1
NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM: 1
run: ./ci.sh --flake ".#checks.$(nix eval --raw --impure --expr builtins.currentSystem)"
- name: Submit auto-update PR
uses: peter-evans/create-pull-request@v7
with:
title: "[chore]: Bump packages to latest version"
delete-branch: true
reviewers: ataraxiasjel
add-paths: |
pkgs/**