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+ name : Update requirements.txt
2+
3+ on :
4+ push :
5+ paths :
6+ - ' **/*.py'
7+ workflow_dispatch :
8+
9+ jobs :
10+ generate-requirements :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v3
16+
17+ - name : Set up Python
18+ uses : actions/setup-python@v4
19+ with :
20+ python-version : ' 3.10'
21+
22+ - name : Install pipreqs
23+ run : pip install pipreqs
24+
25+ - name : Generate requirements.txt
26+ run : pipreqs . --force
27+
28+ - name : Commit changes
29+ run : |
30+ git config --global user.name 'github-actions'
31+ git config --global user.email 'github-actions@github.com'
32+ git add requirements.txt
33+ git commit -m "chore: auto-update requirements.txt" || echo "No changes to commit"
34+ git push
Original file line number Diff line number Diff line change 1+ [settings ]
2+ ignore = [" tests" , " docs" ]
3+ encoding = " utf-8"
You can’t perform that action at this time.
0 commit comments