-
Notifications
You must be signed in to change notification settings - Fork 5
49 lines (43 loc) · 1.39 KB
/
autoupdate_python_versions.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
name: Autoupdate Python Versions
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
# Or if the "scripts" directory is modified
push:
paths:
- 'scripts/**'
- '.github/workflows/autoupdate_python_versions.yml'
env:
MAIN_PYTHON_VERSION: '3.12'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
autoupdate-python-versions:
name: Autoupdate Python Versions
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
- name: Set up Python ${{ env.MAIN_PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
- name: Run the autoupdate script
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt
python scripts/update_python_versions.py
- name: Commit changes (if any)
uses: peter-evans/create-pull-request@v7
with:
commit-message: 'chore: update Python versions'
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
title: 'chore: update Python versions'
body: 'This PR updates the Python versions in the CI configuration files.'
branch: feat/update-python-version
base: main
delete-branch: true