Skip to content

update-flake-lock

update-flake-lock #42

name: update-flake-lock
on:
workflow_dispatch:
schedule:
- cron: "40 4 15 * *"
jobs:
update-flakes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Set default git branch (to reduce log spam)
run: git config --global init.defaultBranch master
- name: Update flake.lock
run: |
git config user.name '${{ github.actor }}'
git config user.email '${{ github.actor }}@users.noreply.github.com'
nix flake update --commit-lock-file
- name: CI
run: nix flake check --print-build-logs
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
branch: flake-updates
delete-branch: true
title: "Update flake.lock"
body: |
## Run report
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"