File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # .github/workflows/
2- # Place in: rajit2004/open-source-contributions /.github/workflows/
1+ # .github/workflows/update_problems.yml
2+ # Place in: java_progress /.github/workflows/
33
4- name : Update Contributions
4+ name : Update LeetCode Problem List
55
66on :
7- schedule :
8- - cron : " 0 */3 * * *" # every 3 hours
9- workflow_dispatch : # manual trigger
7+ push :
8+ branches : [main]
9+ paths :
10+ - " JAVA/LeetCode/**" # triggers only when a new solution is pushed
11+ workflow_dispatch :
1012
1113jobs :
1214 update :
1517 contents : write
1618
1719 steps :
18- - name : Checkout repo
20+ - name : Checkout
1921 uses : actions/checkout@v4
2022 with :
23+ fetch-depth : 0 # needed for git log dates
2124 token : ${{ secrets.GITHUB_TOKEN }}
2225
2326 - name : Set up Python
@@ -28,15 +31,13 @@ jobs:
2831 - name : Install dependencies
2932 run : pip install requests
3033
31- - name : Run contribution tracker
32- run : python .github/update_contributions.py
33- env :
34- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34+ - name : Generate PROBLEMS.md
35+ run : python .github/scripts/update_problems.py
3536
3637 - name : Commit and push
3738 run : |
3839 git config user.name "github-actions[bot]"
3940 git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
40- git add README.md
41- git diff --staged --quiet || git commit -m "🤝 Auto-update contributions "
41+ git add PROBLEMS.md README.md
42+ git diff --staged --quiet || git commit -m "📋 Auto-update problem list "
4243 git push
You can’t perform that action at this time.
0 commit comments