Skip to content

Bump flake.lock

Bump flake.lock #172

name: Bump flake.lock
on:
schedule:
- cron: "0 9 * * *"
workflow_dispatch:
jobs:
bump-flake:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install nix
uses: cachix/install-nix-action@v23
with:
extra_nix_config: warn-dirty = false
- name: Update flake
id: flake-update
run: |
result=$(nix eval --impure --expr "(import (fetchTarball https://github.com/NixOS/nixpkgs/archive/master.tar.gz) { }).lib.attrNames $(cat flake.nix).inputs" | sed 's/" "/","/g' | jq '.[] | select(. != "private-config")' | sed 's/"//g' | xargs -L1 nix flake lock --update-input 2>&1 | grep -v warning:)
echo "::group::Flake update"
echo "$result"
echo "::endgroup::"
{
echo "FLAKE_UPDATE_RESULT<<EOF"
echo "$result"
echo EOF
} >> "$GITHUB_OUTPUT"
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: |
Bump flake.lock
${{ steps.flake-update.outputs.FLAKE_UPDATE_RESULT }}
branch: master
commit_options: '--no-verify --signoff'
file_pattern: flake.lock
commit_user_name: Flake Bot
commit_author: Flake Bot <[email protected]>
skip_dirty_check: false
skip_fetch: true