workflows: add requirement updates
This commit is contained in:
parent
24bf078566
commit
734152afc4
30
.github/workflows/requirements.yml
vendored
Normal file
30
.github/workflows/requirements.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
name: Update requirements file
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branch: develop
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-requirements:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install Poetry
|
||||||
|
uses: snok/install-poetry@v1
|
||||||
|
with:
|
||||||
|
virtualenvs-create: true
|
||||||
|
virtualenvs-in-project: true
|
||||||
|
- name: Generate requirements
|
||||||
|
run: |
|
||||||
|
poetry lock
|
||||||
|
echo -e "# THE FILE WAS GENERATED BY POETRY, DO NOT EDIT!\n\n" > src/requirements.txt
|
||||||
|
poetry export --without-hashes -f requirements.txt >> src/requirements.txt
|
||||||
|
echo -e "# THE FILE WAS GENERATED BY POETRY, DO NOT EDIT!\n\n" > src/requirements-dev.txt
|
||||||
|
poetry export --dev --without-hashes -f requirements.txt >> src/requirements-dev.txt
|
||||||
|
echo -e "src/." >> src/requirements-dev.txt
|
||||||
|
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
|
with:
|
||||||
|
commit_message: Update requirements{-dev}.txt
|
||||||
Loading…
Reference in New Issue
Block a user