Skip to content

.github/workflows/flake-update.yml #470

.github/workflows/flake-update.yml

.github/workflows/flake-update.yml #470

Workflow file for this run

on:
schedule:
- cron: '* * * * 0'
workflow_dispatch:
jobs:
update:
name: "Update flake inputs"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-unstable
- name: Update lockfile
id: update
run: |
cp flake.lock /tmp/oldlock
nix --extra-experimental-features 'nix-command flakes' flake update
if cmp -s flake.lock /tmp/oldlock; then
echo "MOD=1" >> $GITHUB_OUTPUT
else
echo "MOD=0" >> $GITHUB_OUTPUT
fi
- uses: actions4git/add-commit-push@v1
if: ${{ steps.update.outpus.MOD == '1' }}
with:
commit-message: "Update flake lockfile"