Skip to content

Commit

Permalink
Merge pull request #515 from AkashiCoin/main
Browse files Browse the repository at this point in the history
使用action自动更新poetry.lock
  • Loading branch information
HibiKier committed May 22, 2022
2 parents 3333d1e + 8d3f101 commit 089f9fe
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 485 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/Generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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.bak "8,11d" pyproject.toml
poetry lock
mv pyproject.toml.bak pyproject.toml
# 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 "Auto generate poetry.lock" -a
# push
- name: push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 089f9fe

Please sign in to comment.