Update flake.lock #7
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: "0 0 * * 0" # weekly | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
lockfile: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@main | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Update nixpkgs input to unstable | |
run: | | |
sed -i 's|hydenix-nixpkgs.url = "github:nixos/nixpkgs/.*"|hydenix-nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"|' flake.nix | |
- name: Update flake.lock | |
run: nix flake update | |
- name: Update flake.nix with new rev | |
run: | | |
NEW_REV=$(jq -r '.nodes."hydenix-nixpkgs".locked.rev' flake.lock) | |
sed -i "s|hydenix-nixpkgs.url = \"github:nixos/nixpkgs/.*\"|hydenix-nixpkgs.url = \"github:nixos/nixpkgs/$NEW_REV\"|" flake.nix | |
- name: Check flake | |
id: check | |
continue-on-error: true | |
run: nix flake check | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
commit-message: "chore(deps): update flake.lock" | |
title: "chore(deps): update flake.lock" | |
branch: update-flake-lock-${{ github.run_id }} | |
delete-branch: true | |
body: | | |
Updated flake.lock file. | |
Flake check status: ${{ steps.check.outcome == 'success' && '✅ Passed' || '❌ Failed' }} |