Skip to content

build(deps-dev): bump coverage from 7.5.3 to 7.6.0 #24

build(deps-dev): bump coverage from 7.5.3 to 7.6.0

build(deps-dev): bump coverage from 7.5.3 to 7.6.0 #24

name: Generate requirements files
on:
push:
paths:
- 'pyproject.toml'
- 'poetry.lock'
pull_request:
paths:
- 'pyproject.toml'
- 'poetry.lock'
workflow_dispatch:
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.10'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"
poetry --version
- name: Install dependencies
run: poetry install
- name: Install poetry-plugin-export
run: poetry self add poetry-plugin-export
- name: Export requirements.txt
run: poetry export --without-hashes -f requirements.txt --output requirements.txt
- name: Export dev-requirements.txt
run: poetry export --without-hashes --with dev -f requirements.txt --output dev-requirements.txt
- name: Check for changes
id: check_changes
run: |
git add requirements.txt dev-requirements.txt
git diff --cached --exit-code || echo "Changes detected" > changes_detected.txt
- name: Commit and Push changes
if: steps.check_changes.outputs.changes_detected
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git commit -m "Update requirements files"
git push