-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #515 from AkashiCoin/main
使用action自动更新poetry.lock
- Loading branch information
Showing
2 changed files
with
64 additions
and
485 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
Oops, something went wrong.