Update T3 Code #537
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 T3 Code | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 * * * *" | |
| jobs: | |
| update-t3code: | |
| name: Update T3 Code | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Check if update is needed | |
| id: check | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| bash .github/update.sh --ci --only-check | |
| - name: Install Nix | |
| if: steps.check.outputs.should_update == 'true' | |
| uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixpkgs-unstable | |
| - name: Update versions | |
| id: update | |
| if: steps.check.outputs.should_update == 'true' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| bash .github/update.sh --ci | |
| - 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 | |
| id: commit | |
| if: steps.check.outputs.should_update == 'true' | |
| uses: stefanzweifel/git-auto-commit-action@v6 | |
| with: | |
| commit_message: "${{ steps.update.outputs.commit_message }}" | |
| file_pattern: "sources.json" |