Skip to content

Update Flake

Update Flake #16

Workflow file for this run

name: Update Flake
on:
workflow_dispatch:
schedule:
- cron: "43 3 */10 * *" # run every ten days at 3:43 am
permissions:
contents: write
pull-requests: write
jobs:
update:
name: "nix flake update"
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
fetch-depth: 0
- uses: DeterminateSystems/nix-installer-action@c5a866b6ab867e88becbed4467b93592bce69f8a # v21
- name: nix flake update
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git branch -f auto/update-flake origin/main
git checkout auto/update-flake
nix flake update --commit-lock-file
git push --force origin auto/update-flake
- name: "Create pull request"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if ! gh pr list --head update --json number --base main | grep -q number; then
gh pr create --base main --head update --title "Update Flake" --body ""
fi