Skip to content

.github/workflows/update-requirements.yml #1

.github/workflows/update-requirements.yml

.github/workflows/update-requirements.yml #1

on:
schedule:
- cron: '0 0 * * 0' # Every Sunday at 00:00 UTC
jobs:
update-requirements:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install pip-tools
run: pip install pip-tools
- name: Compile the new requirements.txt
run: pip-compile requirements.in
- name: Commit and push if changes are detected
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git add requirements.txt
git commit -m "Update requirements.txt" -a || echo "No changes to commit"
git push