Update flake.lock #14
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: Update flake.lock | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 6 */3 * *" | |
| jobs: | |
| update-flake-lock: | |
| name: Update flake.lock | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixpkgs-unstable | |
| - name: Update flake.lock | |
| run: | | |
| nix flake update | |
| - name: Check if update is needed | |
| id: check | |
| run: | | |
| if git diff --quiet -- flake.lock; then | |
| echo "should_update=false" >>"$GITHUB_OUTPUT" | |
| else | |
| echo "should_update=true" >>"$GITHUB_OUTPUT" | |
| fi | |
| - name: Validate builds | |
| if: steps.check.outputs.should_update == 'true' | |
| run: | | |
| nix build --accept-flake-config .#t3code .#t3code-appimage .#t3code-with-codex .#t3code-appimage-with-codex | |
| - name: Commit changes | |
| if: steps.check.outputs.should_update == 'true' | |
| uses: stefanzweifel/git-auto-commit-action@v6 | |
| with: | |
| commit_message: "update: flake.lock" | |
| file_pattern: "flake.lock" |