update-flake-lock #43
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-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@v7 | |
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 }}" |