Create Generate.yml

This commit is contained in:
AkashiCoin 2022-05-21 23:50:51 +08:00
parent 1de5ae09bc
commit 5fc208c95a
2 changed files with 38 additions and 0 deletions

37
.github/workflows/Generate.yml vendored Normal file
View File

@ -0,0 +1,37 @@
name: Generate poetry.lock
on:
push:
branches:
- "main"
paths:
- 'pyproject.toml'
jobs:
poetry_lock:
name: Generate
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: he0119/setup-python@main
with:
python-version: "3.9"
- name: poetry lock
run: |
rm -f poetry.lock
sed -i "8,11d" pyproject.toml
poetry lock
# commit
- name: commit file
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add poetry.lock
git commit -m "${date}n: Auto generate poetry.lock" -a
# push
- name: push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.ACCESS_TOKEN }}

View File

@ -48,3 +48,4 @@ wordcloud = "^1.8.1"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"