flake bump #32
This file contains hidden or 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: flake bump | |
| on: | |
| schedule: | |
| - cron: "0 10 */2 * *" # 12:00 CEST | |
| permissions: | |
| contents: write | |
| jobs: | |
| bump-build-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: cachix/install-nix-action@v31 | |
| - name: bump flake.lock | |
| id: bump | |
| run: | | |
| git pull --rebase origin "$GITHUB_REF_NAME" | |
| nix flake update nixpkgs nixpkgs-unstable home-manager --no-use-registries --refresh | |
| git diff --quiet -- flake.lock && echo "changed=false" >>"$GITHUB_OUTPUT" || echo "changed=true" >>"$GITHUB_OUTPUT" | |
| - name: build system | |
| if: steps.bump.outputs.changed == 'true' | |
| run: nix build --refresh --no-link '.#nixosConfigurations.loftserveren01.config.system.build.toplevel' | |
| - name: Commit & push | |
| if: steps.bump.outputs.changed == 'true' | |
| run: | | |
| git add flake.lock | |
| git \ | |
| -c user.name="github-actions" \ | |
| -c user.email="[email protected]" \ | |
| commit -m "chore: bump flake.lock" | |
| git push origin HEAD:"$GITHUB_REF_NAME" | |