Skip to content

Commit f1b5c83

Browse files
authored
Support different versions for branch and binary
1 parent a4bb92c commit f1b5c83

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/sync.yml

+17-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
description: "Name of the Transifex translation project"
1212
required: true
1313
type: string
14+
py_bin_ver:
15+
description: "Version of the Python binary to use; Optional, defaults to the current branch name"
16+
required: false
17+
type: string
1418
secrets:
1519
TX_TOKEN:
1620
description: "Token required for interacting with Transifex API"
@@ -49,9 +53,21 @@ jobs:
4953
ref: ${{ env.PYDOC_VERSION }}
5054
path: ${{ env.LANGUAGE_DIR }}
5155

56+
- name: Set Python version to use
57+
id: pyver
58+
shell: bash
59+
run: |
60+
if [[ "${{ inputs.py_bin_ver }}" != '' ]]
61+
pyver=${{ inputs.py_bin_ver }}
62+
else
63+
pyver=$PYDOC_VERSION
64+
fi
65+
echo "PYVER=$pyver" >> $GITHUB_OUTPUT
66+
echo "PYVER=$pyver"
67+
5268
- uses: actions/setup-python@v5
5369
with:
54-
python-version: ${{ inputs.version }}
70+
python-version: ${{ env.PYVER }}
5571
allow-prereleases: true
5672
cache: 'pip'
5773
cache-dependency-path: |

0 commit comments

Comments
 (0)