-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
46f33ec
commit 671dcab
Showing
2 changed files
with
51 additions
and
17 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,51 @@ | ||
name: Update Python Dependencies | ||
|
||
# on: | ||
# schedule: | ||
# # Runs at 00:00 UTC every two weeks on Sunday | ||
# - cron: '0 0 * * 0/2' | ||
# workflow_dispatch: | ||
# # Allows manual triggering of the workflow. | ||
|
||
jobs: | ||
update-dependencies: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.11' # Use the Python version appropriate to your project | ||
|
||
- name: Install Poetry | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
pip install poetry | ||
poetry config virtualenvs.create false | ||
- name: Install dependencies | ||
run: poetry install --no-interaction | ||
|
||
- name: Update Dependencies | ||
run: poetry update | ||
|
||
- name: Create a new branch and push changes | ||
run: | | ||
git config --global user.name 'CI Bot' | ||
git config --global user.email '[email protected]' | ||
git checkout -b update-dependencies-$(date +'%Y-%m-%d') | ||
git add poetry.lock | ||
git commit -m "Update dependencies" || echo "No changes to commit" | ||
git push --set-upstream origin update-dependencies-$(date +'%Y-%m-%d') | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
branch: update-dependencies-$(date +'%Y-%m-%d') # The branch to push changes | ||
title: "Update dependencies $(date +'%Y-%m-%d')" | ||
body: | | ||
Updates dependencies to their latest versions. | ||
labels: dependencies,automated PR | ||
token: ${{ secrets.GITHUB_TOKEN }} |