-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (55 loc) · 1.71 KB
/
updpyver.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
56
57
58
59
60
61
62
63
name: Update versions
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
schedule:
- cron: 0 13 * * 5
permissions:
pull-requests: write
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Check out ${{ github.repository }}
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Set up Python 3
uses: actions/setup-python@v5.3.0
with:
python-version: '3'
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Install dependencies
run: |
pip3 install --upgrade pip
pip3 install -r requirements.txt
- name: Update versions.txt file
run: |
scripts/manage_versions.py update_versions_file
- name: Commit changes to a new branch
if: ${{ success() && !contains(fromJSON('["push", "pull_request"]'), github.event_name) }}
uses: devops-infra/action-commit-push@v0.9.2
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
commit_prefix: "[AUTO]"
commit_message: "Update versions.txt"
force: false
target_branch: update/version
- name: Create pull request
if: ${{ success() && !contains(fromJSON('["push", "pull_request"]'), github.event_name) }}
uses: devops-infra/action-pull-request@v0.5.5
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
source_branch: update/version
target_branch: main
title: Update versions.txt
body: "Changes have been detected to watched Python versions. Please review."
assignee: rffontenelle
get_diff: true