@@ -13,15 +13,16 @@ on: # yamllint disable-line rule:truthy
13
13
required : false
14
14
default : ' main'
15
15
python_version :
16
- description : ' Select Python version to update Pipfile.lock'
16
+ description : ' Select a Python version to update Pipfile.lock'
17
17
required : false
18
- default : ' 3.11'
18
+ default : ' [" 3.11", "3.12"] '
19
19
type : choice
20
20
options :
21
- - ' 3.12'
22
- - ' 3.11'
23
- - ' 3.9'
24
- - ' 3.8'
21
+ - ' ["3.11", "3.12"]'
22
+ - ' ["3.12"]'
23
+ - ' ["3.11"]'
24
+ - ' ["3.9"]'
25
+ - ' ["3.8"]'
25
26
update_optional_dirs :
26
27
description : ' Include optional directories in update'
27
28
required : false
@@ -32,42 +33,46 @@ on: # yamllint disable-line rule:truthy
32
33
- ' false'
33
34
34
35
jobs :
35
- build :
36
+ refresh-pipfile-locks :
36
37
runs-on : ubuntu-latest
38
+ concurrency :
39
+ group : refresh-pipfile-locks-${{ github.ref }}
40
+ cancel-in-progress : false
41
+ strategy :
42
+ fail-fast : false
43
+ max-parallel : 1
44
+ matrix :
45
+ python-version : >-
46
+ ${{ fromJSON( github.event.inputs.python_version || '["3.11", "3.12"]' ) }}
37
47
permissions :
38
48
contents : write
39
49
env :
40
50
BRANCH : ${{ github.event.inputs.branch || 'main' }}
41
- PYTHON_VERSION : ${{ github.event.inputs.python_version || '3.11' }}
42
51
INCLUDE_OPT_DIRS : ${{ github.event.inputs.update_optional_dirs || 'false' }}
52
+
43
53
steps :
44
- # Checkout the specified branch from the specified organization
45
- - name : Checkout code from the specified branch
54
+ - name : Checkout code
46
55
uses : actions/checkout@v4
47
56
with :
48
57
ref : ${{ env.BRANCH }}
49
58
token : ${{ secrets.GH_ACCESS_TOKEN }}
50
59
51
- # Configure Git
52
60
- name : Configure Git
53
61
run : |
54
- git config --global user.email "github-actions[bot]@users.noreply.github.com"
55
- git config --global user.name "GitHub Actions"
62
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
63
+ git config --global user.name "GitHub Actions"
56
64
57
- # Setup Python environment with the specified version (or default to '3.11')
58
- - name : Setup Python environment
65
+ - name : Set up Python ${{ matrix.python-version }}
59
66
uses : actions/setup-python@v5
60
67
with :
61
- python-version : ${{ env.PYTHON_VERSION }}
68
+ python-version : ${{ matrix.python-version }}
62
69
63
- # Install pipenv
64
70
- name : Install pipenv
65
71
run : pip install pipenv
66
72
67
- # Run makefile recipe to refresh Pipfile.lock and push changes back to the branch
68
- - name : Run `make refresh-pipfilelock-files`
73
+ - name : Run make refresh-pipfilelock-files
69
74
run : |
70
- make refresh-pipfilelock-files PYTHON_VERSION=${{ env.PYTHON_VERSION }} INCLUDE_OPT_DIRS=${{ env.INCLUDE_OPT_DIRS }}
75
+ make refresh-pipfilelock-files PYTHON_VERSION=${{ matrix.python-version }} INCLUDE_OPT_DIRS=${{ env.INCLUDE_OPT_DIRS }}
71
76
72
77
- name : Push the changes back to the branch
73
78
run : |
0 commit comments