Skip to content

update flakes

update flakes #1379

Workflow file for this run

name: update flakes
concurrency: update_flakes
on:
workflow_dispatch:
schedule:
- cron: '0 4 * * *'
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@V27
- name: Update lockfile
id: update_lockfile
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
old_ref="$(git rev-parse HEAD)"
nix flake update --commit-lock-file
new_ref="$(git rev-parse HEAD)"
if [[ "$new_ref" == "$old_ref" ]]; then
echo "flake.lock is unchanged"
else
echo "::set-output name=did_change::1"
fi
- name: Push
if: ${{ steps.update_lockfile.outputs.did_change }}
run: |
git pull --rebase
git push origin main