|
13 | 13 | description:"Name of the Transifex translation project"
|
14 | 14 | required:true
|
15 | 15 | type:string
|
| 16 | +py_bin_ver: |
| 17 | +description:"Version of the Python binary to use; Optional, defaults to the current branch name" |
| 18 | +required:false |
| 19 | +type:string |
16 | 20 | workflow_call:
|
17 | 21 | inputs:
|
18 | 22 | version:
|
|
23 | 27 | description:"Name of the Transifex translation project"
|
24 | 28 | required:true
|
25 | 29 | type:string
|
| 30 | +py_bin_ver: |
| 31 | +description:"Version of the Python binary to use; Optional, defaults to the current branch name" |
| 32 | +required:false |
| 33 | +type:string |
26 | 34 | secrets:
|
27 | 35 | TELEGRAM_TOKEN:
|
28 | 36 | description:"Token required for interacting with Telegram API"
|
@@ -51,10 +59,21 @@ jobs:
|
51 | 59 | with:
|
52 | 60 | fetch-depth:5
|
53 | 61 |
|
54 |
| - -name:Set up Python 3 |
55 |
| -uses:actions/setup-python@v5 |
| 62 | + -name:Set Python version to use |
| 63 | +id:pyver |
| 64 | +shell:bash |
| 65 | +run:| |
| 66 | + if [[ "${{ inputs.py_bin_ver }}" != '' ]] |
| 67 | + pyver=${{ inputs.py_bin_ver }} |
| 68 | + else |
| 69 | + pyver=$PYDOC_VERSION |
| 70 | + fi |
| 71 | + echo "PYVER=$pyver" >> $GITHUB_OUTPUT |
| 72 | + echo "PYVER=$pyver" |
| 73 | +
|
| 74 | + -uses:actions/setup-python@v5 |
56 | 75 | with:
|
57 |
| -python-version:${{inputs.version }} |
| 76 | +python-version:${{env.PYVER }} |
58 | 77 | cache:pip
|
59 | 78 | allow-prereleases:true
|
60 | 79 |
|
@@ -117,10 +136,21 @@ jobs:
|
117 | 136 | with:
|
118 | 137 | fetch-depth:5
|
119 | 138 |
|
120 |
| - -name:Set up Python 3 |
121 |
| -uses:actions/setup-python@v5 |
| 139 | + -name:Set Python version to use |
| 140 | +id:pyver |
| 141 | +shell:bash |
| 142 | +run:| |
| 143 | + if [[ "${{ inputs.py_bin_ver }}" != '' ]] |
| 144 | + pyver=${{ inputs.py_bin_ver }} |
| 145 | + else |
| 146 | + pyver=$PYDOC_VERSION |
| 147 | + fi |
| 148 | + echo "PYVER=$pyver" >> $GITHUB_OUTPUT |
| 149 | + echo "PYVER=$pyver" |
| 150 | +
|
| 151 | + -uses:actions/setup-python@v5 |
122 | 152 | with:
|
123 |
| -python-version:${{inputs.version }} |
| 153 | +python-version:${{env.PYVER }} |
124 | 154 | cache:pip
|
125 | 155 | allow-prereleases:true
|
126 | 156 |
|
|