PamGram/.github/workflows/poetry.yml
2023-04-03 16:17:40 +08:00

42 lines
1.0 KiB
YAML

name: Update Lockfile and Requirements
on:
pull_request:
types:
- labeled
jobs:
update-lockfile-and-requirements:
if: github.event.label.name == 'Update Lockfile and Requirements'
name: Update Lockfile and Requirements
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install Poetry
run: |
pip install --upgrade pip
pip install poetry
- name: Install dependencies
run: |
rm -r poetry.lock
poetry install
- name: Update lockfile and requirements
run: |
poetry lock
poetry export --extras all --without-hashes --format=requirements.txt > requirements.txt
- name: Upload Lockfile and Requirements
uses: actions/upload-artifact@v3
with:
path: |
poetry.lock
requirements.txt