|
13 | 13 | description: "Name of the Transifex translation project" |
14 | 14 | required: true |
15 | 15 | type: string |
| 16 | + py_bin: |
| 17 | + description: "Python binary version to use (useful if not equal to the 'version' input)" |
| 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: |
| 31 | + description: "Python binary version to use (useful if not equal to the 'version' input)" |
| 32 | + required: false |
| 33 | + type: string |
26 | 34 | secrets: |
27 | 35 | TELEGRAM_TOKEN: |
28 | 36 | description: "Token required for interacting with Telegram API" |
@@ -50,11 +58,20 @@ jobs: |
50 | 58 | - uses: actions/checkout@v4 |
51 | 59 | with: |
52 | 60 | fetch-depth: 5 |
| 61 | + |
| 62 | + - name: Set python binary version to use |
| 63 | + run: | |
| 64 | + if [[ -n "${{ inputs.py_bin }}" ]]; then |
| 65 | + py_bin="${{ inputs.py_bin }}" |
| 66 | + else |
| 67 | + py_bin="${{ inputs.version }}" |
| 68 | + fi |
| 69 | + echo "PYTHON_BINARY_VERSION=$py_bin" >> $GITHUB_ENV |
53 | 70 |
|
54 | 71 | - name: Set up Python 3 |
55 | 72 | uses: actions/setup-python@v5 |
56 | 73 | with: |
57 | | - python-version: ${{ inputs.version }} |
| 74 | + python-version: ${{ env.PYTHON_BINARY_VERSION }} |
58 | 75 | cache: pip |
59 | 76 | allow-prereleases: true |
60 | 77 |
|
@@ -116,11 +133,20 @@ jobs: |
116 | 133 | - uses: actions/checkout@v4 |
117 | 134 | with: |
118 | 135 | fetch-depth: 5 |
| 136 | + |
| 137 | + - name: Set python binary version to use |
| 138 | + run: | |
| 139 | + if [[ -n "${{ inputs.py_bin }}" ]]; then |
| 140 | + py_bin="${{ inputs.py_bin }}" |
| 141 | + else |
| 142 | + py_bin="${{ inputs.version }}" |
| 143 | + fi |
| 144 | + echo "PYTHON_BINARY_VERSION=$py_bin" >> $GITHUB_ENV |
119 | 145 |
|
120 | 146 | - name: Set up Python 3 |
121 | 147 | uses: actions/setup-python@v5 |
122 | 148 | with: |
123 | | - python-version: ${{ inputs.version }} |
| 149 | + python-version: ${{ env.PYTHON_BINARY_VERSION }} |
124 | 150 | cache: pip |
125 | 151 | allow-prereleases: true |
126 | 152 |
|
|
0 commit comments