Skip to content

Ultimate LeetCode Sync #232

Ultimate LeetCode Sync

Ultimate LeetCode Sync #232

Workflow file for this run

name: Ultimate LeetCode Sync
on:
workflow_dispatch:
inputs:
patch_only:
description: '仅修复描述为None的题目(不重新生成AI分析)'
required: false
default: 'false'
type: choice
options: ['false', 'true']
schedule:
- cron: '0 8 * * *'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Dependencies
run: pip install requests openai tqdm python-dotenv
- name: Run Ultimate Sync
env:
LEETCODE_SESSION: ${{ secrets.LEETCODE_SESSION }}
LEETCODE_CSRFTOKEN: ${{ secrets.LEETCODE_CSRFTOKEN }}
CHATGPT_TOKEN: ${{ secrets.CHATGPT_TOKEN }}
PATCH_MODE: ${{ github.event.inputs.patch_only || 'false' }}
run: python fetch_all_pro.py
- name: Commit and Push Changes
run: |
git config --global user.name 'echo-xiao'
git config --global user.email 'echoxiao666@gmail.com'
git add .
git commit -m "Complete sync of 364+ problems with AI review" || exit 0
git push