mirror of
https://github.com/Melorise/cp-nix.git
synced 2026-11-07 14:39:34 +00:00
update lock and add auto update lock
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
name: Update flake lock
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * 1"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
concurrency:
|
||||
group: update-flake-lock
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
update:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
github_access_token: ${{ github.token }}
|
||||
|
||||
- name: Update lock file
|
||||
run: nix flake update
|
||||
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if git diff --quiet -- flake.lock; then
|
||||
exit 0
|
||||
fi
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add flake.lock
|
||||
git commit -m "flake: update lock file"
|
||||
git push
|
||||
Reference in New Issue
Block a user