mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
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:
@@ -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
|
||||
@@ -14,7 +14,7 @@ permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: crowdin-translation-sync
|
||||
group: crowdin-synchronization
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user