Skip to content

Commit ea9c85d

Browse files
committed
feat: update get-translations.yml workflow
1 parent 12c7ae9 commit ea9c85d

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

.github/workflows/get-translations.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,31 @@ jobs:
4141
run: |
4242
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
4343
44-
# Build and prepare translations
44+
# Build translations
4545
- name: Build Crowdin project
46-
run: npx ts-node -O '{"module":"commonjs"}' ./src/scripts/crowdin/translations/triggerBuild.ts
46+
id: build-crowdin
47+
run: |
48+
OUTPUT=$(npx ts-node -O '{"module":"commonjs"}' ./src/scripts/crowdin/translations/triggerBuild.ts)
49+
echo "$OUTPUT"
50+
shell: bash
4751

4852
- name: Await latest build to finish
49-
run: npx ts-node -O '{"module":"commonjs"}' ./src/scripts/crowdin/translations/awaitLatestBuild.ts
53+
env:
54+
BUILD_ID: ${{ steps.build-crowdin.outputs.buildId}}
55+
run: |
56+
OUTPUT=$(npx ts-node -O '{"module":"commonjs"}' ./src/scripts/crowdin/translations/awaitLatestBuild.ts)
57+
echo "$OUTPUT"
58+
shell: bash
59+
60+
- name: Check build success
61+
run: |
62+
if [ "${{ steps.build-crowdin.outputs.buildSuccess }}" = "false" ]; then
63+
echo "Build timed out, exiting"
64+
exit 1
65+
fi
66+
shell: bash
5067

68+
# Prepare bucket ids
5169
- name: Get latest translation bucket directory ids
5270
run: npx ts-node -O '{"module":"commonjs"}' ./src/scripts/crowdin/translations/getBucketDirectoryIds.ts
5371

0 commit comments

Comments
 (0)