name: Update Cursor Version on: schedule: - cron: '0 12 * * *' # Run daily at 12:00 UTC workflow_dispatch: # Allow manual triggering jobs: update-cursor: runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout repository uses: actions/checkout@v4 with: token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Nix uses: cachix/install-nix-action@v25 with: nix_path: nixpkgs=channel:nixpkgs-unstable - name: Update Cursor using script run: | # Make the script executable chmod +x update-cursor.sh # Run the update script with auto-confirm echo "y" | ./update-cursor.sh - name: Test the updated flake run: | nix flake check nix build .#cursor --dry-run - name: Commit and push changes run: | # Check if there are any changes to commit if git diff --quiet; then echo "No changes to commit" exit 0 fi git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add flake.nix git commit -m "Update Cursor to latest version" git push