Update Claude Code #15
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 Claude Code | |
| on: | |
| schedule: | |
| # Run daily at 6 AM UTC | |
| - cron: '0 6 * * *' | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@v30 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| extra_nix_config: | | |
| experimental-features = nix-command flakes | |
| - name: Update claude-code package | |
| id: update | |
| run: | | |
| # Script exits 0 if already at latest (no changes to commit) | |
| ./nix/claude-code/update.sh | |
| # Capture version for PR title | |
| VERSION=$(grep 'version = "' nix/claude-code/package.nix | head -1 | sed 's/.*version = "\([^"]*\)".*/\1/') | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Update flake.lock | |
| run: nix flake update | |
| - name: Verify build | |
| run: nix develop --command claude --version | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "chore(deps): update claude-code to ${{ steps.update.outputs.version }}" | |
| title: "chore(deps): update claude-code to ${{ steps.update.outputs.version }}" | |
| body: | | |
| Automated update of claude-code package. | |
| **Changes:** | |
| - claude-code updated to ${{ steps.update.outputs.version }} | |
| - Updated flake.lock | |
| **Verification:** | |
| - Package builds successfully | |
| - `claude --version` returns expected version | |
| --- | |
| *This PR was automatically created by the update-claude-code workflow.* | |
| branch: update-claude-code | |
| delete-branch: true |