Files
cursor-nixos-flake/.github/workflows/update-cursor.yml
T
TudorAndrei 34c82989d3 Add flake.lock update to GitHub Actions workflow
- Added 'Update flake lock file' step that runs 'nix flake update'
- Modified commit step to include both flake.nix and flake.lock files
- Ensures lock file stays in sync when flake is updated
2025-10-10 23:36:58 +03:00

56 lines
1.3 KiB
YAML

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: Update flake lock file
run: |
nix flake update
- 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 flake.lock
git commit -m "Update Cursor to latest version"
git push