ci: auto sync flake.lock
All checks were successful
build-flake / Build flake (push) Successful in 4m39s
build-flake / Release a new version (push) Successful in 9s

This commit is contained in:
2025-12-30 20:54:09 +02:00
parent 15233d9ea5
commit baa4928b0e
2 changed files with 51 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
name: Sync flake lock with main nix-configuration project
on:
schedule:
- cron: "15 3 * * *"
workflow_dispatch:
jobs:
update:
permissions:
contents: write
name: Sync flake lock with main nix-configuration project
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Checkout nix-configuration repository
uses: actions/checkout@v6
with:
repository: xaked/nix-config
path: nix-config
ref: master
- name: Setup sudo and jq (required for the next step)
run: apt-get update && apt-get install -y sudo jq
- name: Setup nix
uses: cachix/install-nix-action@v31
with:
extra_nix_config: |
experimental-features = nix-command flakes
github_access_token: ${{ secrets.GH_ACCESS_TOKEN }}
nix_path: nixpkgs=channel:nixos-25.11
- name: Check for update and perform update
run: |
git config user.name gitea-bot
git config user.email bot@git.palkoi.net
git config --global user.email bot@git.palkoi.net
git config --global user.name gitea-bot
tmpfile="$(mktemp)"
jq -srM '.[1].nodes.nixpkgs = .[0].nodes.nixpkgs_2|.[1].nodes.nixpkgs_2 = .[0].nodes.nixpkgs_2 | .[1]' ./nix-config/flake.lock flake.lock > "$tmpfile"
git add flake.lock
- name: Build nix flake
run: |
nix build .
- name: Check nix flake
run: nix flake check --all-systems
- name: Commit updates
run: |
git commit --no-gpg-sign -m 'chore(flake): update flake.lock'
git push

View File

@@ -1,2 +1,3 @@
[commit_types] [commit_types]
version = { bump_patch = true, changelog_title = "Version" } version = { bump_patch = true, changelog_title = "Version" }
chore = { bump_patch = true, changelog_title = "Chore" }