ci: make crowdin source synchronization deterministic

Upload and verify the checked-out English catalog before exporting translations so delayed webhooks cannot stall the scheduled workflow.
This commit is contained in:
neon
2026-09-15 13:11:24 +00:00
parent 2ced82794f
commit 50063b7775
7 changed files with 260 additions and 55 deletions
+55
View File
@@ -0,0 +1,55 @@
name: Crowdin Source Sync
on:
workflow_dispatch:
push:
branches: [main]
paths:
- "client/src/locales/en.json"
- "crowdin.yml"
permissions:
contents: read
concurrency:
group: crowdin-synchronization
cancel-in-progress: false
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
NODE_VERSION: "26"
PNPM_VERSION: "11"
jobs:
synchronize:
name: Synchronize English source
if: github.repository == 'bookorbit/bookorbit'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout main
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: main
- name: Set up Node.js and pnpm
uses: ./.github/actions/setup-node-pnpm
with:
node-version: ${{ env.NODE_VERSION }}
pnpm-version: ${{ env.PNPM_VERSION }}
prefetch: "true"
- name: Check synchronization credentials
env:
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
run: |
if [ -z "$CROWDIN_TOKEN" ]; then
echo "::error::CROWDIN_TOKEN is required."
exit 1
fi
- name: Synchronize English source
env:
CROWDIN_PROJECT_ID: ${{ vars.CROWDIN_PROJECT_ID }}
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
run: pnpm --filter client sync:crowdin-source
+1 -1
View File
@@ -14,7 +14,7 @@ permissions:
contents: read
concurrency:
group: crowdin-translation-sync
group: crowdin-synchronization
cancel-in-progress: false
env: