This commit is contained in:
Lili Deng 2024-10-21 11:42:01 +08:00 коммит произвёл LiliDeng
Родитель 657da85978
Коммит 309f48d11c
1 изменённых файлов: 0 добавлений и 65 удалений

65
.github/workflows/update_deps.yml поставляемый
Просмотреть файл

@ -1,65 +0,0 @@
name: Update Dependencies
on:
schedule:
# Every Monday at 1 AM
- cron: '0 1 * * 1'
jobs:
Update_Deps:
runs-on: ubuntu-latest
name: ${{ matrix.name || matrix.args }}
strategy:
fail-fast: false
matrix:
args: [docs, black, flake8, isort, mypy, pylint]
# Uncomment to enable base dependency checking
# include:
# - args: '-b'
# name: Base Dependencies
env:
DEPS_UPDATED: false
PR_BRANCH: bumpdeps/${{ join(matrix.args, '_') }}_${{ github.run_id }}
PR_MSG: "BumpDeps: ${{ matrix.name || matrix.args }}"
steps:
- uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.PR_DEPLOY_PRIVATE_KEY }}
- name: Install latest Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install bumpdeps
run: pip install bumpdeps
- name: Setup Git
run: |
set -x
git config --global user.name "BumpDeps"
git config --global user.email "<>"
git checkout -b $PR_BRANCH
- name: Update deps
run: |
set -x
bumpdeps ${{ matrix.args }}
git diff --quiet || echo "DEPS_UPDATED=true" >> $GITHUB_ENV
- name: Create PR
env:
GH_TOKEN: ${{ github.token }}
run: |
set -x
git commit -a -m "$PR_MSG"
git --no-pager log -n 2
git push -u origin $PR_BRANCH
gh pr create -B main -H $PR_BRANCH --title "$PR_MSG" --body "Created by Github Action"
if: env.DEPS_UPDATED == 'true'