Files
upstream-tldraw/.github/workflows/i18n-download-strings.yml
upstream-mirror a774ac673a
Some checks failed
Deploy analytics worker / Deploy analytics worker to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
i18n upload strings / Upload latest strings (push) Failing after 1s
Deploy bemo / Deploy bemo to ${{ (github.ref == 'refs/heads/bemo-production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
Deploy grafana resources / ${{ github.event_name == 'push' && 'Deploy grafana resources' || 'Validate grafana resources (dry run)' }} (push) Failing after 0s
End to end tests (dotcom) / Check for relevant changes (push) Failing after 0s
End to end tests (examples) / Check for relevant changes (push) Failing after 0s
End to end tests (mermaid readability) / Check for relevant changes (push) Failing after 1s
End to end tests (perf) / Check for relevant changes (push) Failing after 0s
Publish editor extensions / Publish editor extensions (push) Failing after 1s
Publish SDK packages / Remove the publish-packages label (push) Has been skipped
Checks / Tests & checks (push) Has been cancelled
Checks / Build all projects (push) Has been cancelled
Deploy templates / Deploy templates (push) Has been cancelled
End to end tests (dotcom) / End to end tests (dotcom) (push) Has been cancelled
End to end tests (mermaid readability) / End to end tests (mermaid readability) (push) Has been cancelled
End to end tests (perf) / End to end tests (perf) (push) Has been cancelled
Deploy .com / Deploy dotcom to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Has been cancelled
End to end tests (examples) / End to end tests (examples) (push) Has been cancelled
Publish SDK packages / Publish SDK packages (push) Has been cancelled
Publish SDK packages / Tell user released version (push) Has been cancelled
Publish SDK packages / Publishes code templates to separate repositories (push) Has been cancelled
Publish SDK packages / Deploys the template demos with the new SDK version (push) Has been cancelled
snapshot of https://github.com/tldraw/tldraw.git (main, 2026-09-23; blobs > 131072B omitted)
2026-09-23 16:12:52 +05:00

74 lines
2.2 KiB
YAML

name: i18n download strings
on:
workflow_dispatch:
schedule:
- cron: '0 10 * * 1'
defaults:
run:
shell: bash
permissions:
contents: read
jobs:
download:
name: 'Download latest strings'
runs-on: ubuntu-latest
environment: 'deploy-production'
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
pull-requests: write
repository-projects: write
steps:
- name: Check out code
uses: actions/checkout@v6
with:
fetch-depth: 1
- uses: ./.github/actions/setup
- name: Download i18n strings
run: 'yarn i18n-download-strings'
env:
LOKALISE_API_TOKEN: ${{ secrets.LOKALISE_API_TOKEN }}
LOKALISE_PROJECT_ID: ${{ secrets.LOKALISE_PROJECT_ID }}
LOKALISE_TLDRAW_PROJECT_ID: ${{ secrets.LOKALISE_TLDRAW_PROJECT_ID }}
- name: Compile i18n strings
run: 'yarn build-i18n'
- name: Validate the strings
run: 'yarn i18n-check -f react-intl --locales ./apps/dotcom/client/public/tla/locales/ --source en --only invalidKeys'
- name: Commit and push changes
env:
GH_TOKEN: ${{ github.token }}
run: |
git config --global user.name 'huppy-bot[bot]'
git config --global user.email '128400622+huppy-bot[bot]@users.noreply.github.com'
# Check if there are any changes to JSON files
if ! git diff --quiet '*.json' || ! git diff --cached --quiet '*.json'; then
echo "Changes detected, creating PR..."
else
echo "No changes to commit"
exit 0
fi
# Delete the branch if it already exists
git push origin --delete update-i18n-strings 2>/dev/null || true
git checkout -b update-i18n-strings
git add "*.json"
git commit --no-verify -m '[automated] update i18n strings'
git push --set-upstream origin update-i18n-strings
gh pr create --title "[automated] update i18n strings" --body "This PR updates the i18n strings.
### Change type
- [x] \`other\`" --base main --head update-i18n-strings