mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 06:12:53 +08:00
37 lines
971 B
YAML
37 lines
971 B
YAML
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 }} |