Update Flake inputs #13
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: Update Flake inputs | |
on: | |
schedule: | |
- cron: "0 0 * * 0" # runs weekly on Sunday at 00:00 | |
workflow_dispatch: # allows manual triggering | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v23 | |
with: | |
extra_nix_config: | | |
experimental-features = flakes nix-command | |
flake-registry = https://github.com/c4f3z1n/nix-registry/raw/main/registry.json | |
nix-path = nixpkgs=flake:nixpkgs | |
- run: | | |
nix flake update | |
nix fmt | |
- run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add flake.lock | |
git restore . | |
git commit -m "Updated flake.lock" | |
- uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} | |
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | |
signoff: false | |
branch: flake-update | |
delete-branch: true | |
title: Updated flake.lock | |
assignees: ${{ github.actor }} | |
draft: false |