Skip to content

Merge pull request #16 from schauppi/mLSTM #26

Merge pull request #16 from schauppi/mLSTM

Merge pull request #16 from schauppi/mLSTM #26

name: Update requirements.txt
on:
push:
branches:
- '**'
paths:
- '**/*.py'
permissions: write-all
jobs:
update-requirements:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install pipreqs
run: |
python -m pip install --upgrade pip
pip install pipreqs
- name: Generate project specific requirements.txt in src/
run: |
pipreqs ./src --force
- name: Move requirements.txt to the root directory
run: |
mv src/requirements.txt ./requirements.txt
- name: Commit and push if changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add requirements.txt
git commit -m "Automatically update requirements.txt with pipreqs" || echo "No changes to commit"
git push