Skip to content

update-flake-lock

update-flake-lock #202

name: update-flake-lock
on:
workflow_dispatch: # allows manual triggering
schedule:
- cron: "0 0 * * 1,4" # Run twice a week
jobs:
lockfile:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v30
with:
# nix run in 2.20 seems broken: Exec format error
install_url: https://nixos.org/releases/nix/nix-2.19.4/install
extra_nix_config: |
accept-flake-config = true
experimental-features = nix-command flakes
- name: Eval flake
run: |
nix flake show
- name: setup
run: |
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
- name: Update flake
run: |
nix flake update --commit-lock-file
- name: Update dev flake
run: |
pushd dev/private
nix flake update --commit-lock-file
popd
nix run .#update-dev-private-narHash
git commit --amend --no-edit dev/private.narHash
- uses: peter-evans/create-pull-request@v7
with:
title: Update flake.lock files
branch: update-flake-lock
labels: |
merge-queue