added ability to alter randomly given spell as suggested by GorillaOf… #25
This file contains 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 Python Requirements | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
update-requirements: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependency analyzer | |
run: | | |
python -m pip install --upgrade pip | |
pip install pipreqs | |
- name: Analyze imports and generate requirements | |
run: | | |
# Generate requirements from actual imports | |
pipreqs . --force --mode no-pin | |
# Install the found requirements | |
pip install -r requirements.txt | |
# Create comprehensive requirements file with versions | |
pip freeze > requirements.txt | |
- name: Commit updated requirements | |
run: | | |
git config user.name "GitHub Actions Bot" | |
git config user.email "[email protected]" | |
git add requirements.txt | |
git commit -m "Update requirements.txt based on project imports" || true | |
git push |