Skip to content

Commit 7229021

Browse files
committed
ci: install Transifex CLI reliably in Actions
1 parent f8869ba commit 7229021

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

‎.github/workflows/transifex-push.yml‎

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,25 @@ jobs:
158158
python -m pip install requests cogapp polib transifex-python sphinx-intl blurb six
159159
160160
- name: Install Transifex CLI
161+
env:
162+
TX_CLI_VERSION: ${{ env.TX_CLI_VERSION }}
161163
run: |
162-
curl -fsSL https://raw.githubusercontent.com/transifex/cli/master/install.sh \
163-
| bash -s -- "v${TX_CLI_VERSION}"
164-
command -v tx
165-
tx --version
164+
set -euo pipefail
165+
166+
mkdir -p "$RUNNER_TEMP/txcli"
167+
curl -fsSL \
168+
"https://github.com/transifex/cli/releases/download/v${TX_CLI_VERSION}/tx-linux-amd64.tar.gz" \
169+
-o "$RUNNER_TEMP/txcli/tx.tar.gz"
170+
171+
tar -xzf "$RUNNER_TEMP/txcli/tx.tar.gz" -C "$RUNNER_TEMP/txcli"
172+
173+
TX_BINARY="$(find "$RUNNER_TEMP/txcli" -type f -name tx -print -quit)"
174+
test -n "$TX_BINARY"
175+
176+
sudo install -m 0755 "$TX_BINARY" /usr/local/bin/tx
177+
echo "/usr/local/bin" >> "$GITHUB_PATH"
178+
179+
/usr/local/bin/tx --version
166180
167181
- name: Generate gettext source templates
168182
run: |

0 commit comments

Comments
 (0)