Skip to content

ci: add AppVeyor API monitoring loop scripts #142

ci: add AppVeyor API monitoring loop scripts

ci: add AppVeyor API monitoring loop scripts #142

name: Fetch LeetCode Signatures
on:
push:
branches: [ "main" ]
schedule:
# Run every 6 hours to gradually process all problems without hitting hard rate limits
- cron: '0 */6 * * *'
workflow_dispatch:
# Allow manual triggering
permissions:
contents: write
jobs:
fetch-signatures:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Run fetch script
run: python fetch_signatures.py
- name: Pull remote changes
run: git pull origin ${{ github.head_ref || github.ref_name }} --rebase --autostash
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "chore(data): auto-update problem signatures from LeetCode"
file_pattern: "problems/**/*.json"
commit_user_name: "github-actions[bot]"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"