From 5fc208c95a7fd5209ee7b8d04ea30f6de3a6426c Mon Sep 17 00:00:00 2001 From: AkashiCoin <55268546+AkashiCoin@users.noreply.github.com> Date: Sat, 21 May 2022 23:50:51 +0800 Subject: [PATCH] Create Generate.yml --- .github/workflows/Generate.yml | 37 ++++++++++++++++++++++++++++++++++ pyproject.toml | 1 + 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/Generate.yml diff --git a/.github/workflows/Generate.yml b/.github/workflows/Generate.yml new file mode 100644 index 00000000..4ed44828 --- /dev/null +++ b/.github/workflows/Generate.yml @@ -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 }} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d7900df9..5b337ade 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,3 +48,4 @@ wordcloud = "^1.8.1" [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" +