-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (38 loc) · 1.18 KB
/
update_dependencies.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Update depencies in poetry lockfile
on:
schedule:
- cron: '0 1 * * 1'
push:
workflow_dispatch:
jobs:
update_dependencies:
runs-on: ubuntu-latest
steps:
# Check out repo and set up Python
- uses: actions/checkout@v3
with:
lfs: true
# Use cached python and dependencies, install poetry
- name: "Setup Python, Poetry and Dependencies"
uses: packetcoders/action-setup-cache-python-poetry@main
with:
python-version: 3.8
poetry-version: 1.2.2
# update poetry lockfile
- name: "Update poetry lock file"
id: update
run: |
poetry run poetry self update
poetry run poetry update
status=$(git status | grep poetry.lock)
echo "status=$status" >> $GITHUB_OUTPUT
# create pull request if necessary
- name: "Create Pull Request"
uses: peter-evans/create-pull-request@v5
if: ${{ steps.update.outputs.status != '' }}
with:
commit-message: Update dependencies
title: "Update dependencies"
body: |
- Dependency updates
${{ steps.update.outputs.update_output }}