Skip to content

Style changes

Style changes #4

name: Autogenerate Requirements
on:
pull_request:
branches: [dev, main]
paths:
- 'pyproject.toml'
- 'tools/autogenerate_requirements.py'
- '.github/workflows/autogenerate_requirements.yaml'
jobs:
update-requirements:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Run autogeneration script
run: |
pip install toml
python tools/autogenerate_requirements.py
- name: Commit files
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git diff --quiet requirements.txt || {
git add requirements.txt
git commit -m "[Automated] Updated requirements.txt"
}
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: ${{ github.head_ref }}