Merge pull request #10 from SebVde/bar_yehuda_fvs #22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update requirements.txt | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| update-reqs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install pipreqs | |
| run: pip install pipreqs | |
| - name: Update requirements.txt | |
| run: pipreqs . --force --ignore .venv --mode gt | |
| - name: Commit and push if changed | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git add requirements.txt | |
| if git diff --cached --quiet; then | |
| echo "No changes in requirements.txt" | |
| else | |
| git commit -m "Updated requirements.txt" | |
| git push | |
| fi |