mirror of
https://github.com/oslook/cursor-ai-downloads.git
synced 2025-09-26 19:31:12 +08:00
Implement automatic Cursor download links tracking system
This commit is contained in:
46
.github/workflows/update-cursor-links.yml
vendored
Normal file
46
.github/workflows/update-cursor-links.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Update Cursor Download Links
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 * * * *' # Run hourly at minute 0
|
||||
workflow_dispatch: # Allow manual triggering
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
update-links:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18'
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Run update script
|
||||
run: bun src/update-cursor-links.ts
|
||||
|
||||
- name: Check for changes
|
||||
id: git-check
|
||||
run: |
|
||||
git diff --exit-code || echo "changes=true" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Commit and push if changed
|
||||
if: steps.git-check.outputs.changes == 'true'
|
||||
run: |
|
||||
git config --global user.email "github-actions@github.com"
|
||||
git config --global user.name "GitHub Actions"
|
||||
git add README.md
|
||||
git commit -m "Update Cursor download links"
|
||||
git push
|
Reference in New Issue
Block a user