Auto update packages #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/** |