-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.43 KB
/
scheduled-maintenance.template.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
44
45
46
47
48
49
50
51
52
53
54
55
name: "Scheduled Maintenance: Run 'poetry update' and create a PR"
on:
push:
branches:
- run-poetry-update-workflow
schedule:
- cron: '0 0 * * MON'
workflow_dispatch:
jobs:
task:
permissions:
contents: write
pull-requests: write
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Auth to Google Cloud
# important! this 'auth' is referenced as `steps.auth` on the next job
id: auth
# https://github.com/google-github-actions/auth#authenticating-via-service-account-key-json-1
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.MCI_GCLOUD_AUTH_JSON }}'
token_format: 'access_token'
- run: sudo apt-get -y install jq
- run: poetry update --lock
id: poetry-update
- name: Validate dependency updates
run: |
poetry install
poetry run pytest
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
add-paths: poetry.lock
commit-message: ${{ env.message }}
delete-branch: true
title: ${{ env.message }}
assignees: ${template:maintainer}
reviewers: ${template:maintainer}
labels: semver-guidance:patch
env:
message: '[bot] patch dependencies'