mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-25 08:08:39 +00:00
Bumps the github-actions group with 2 updates: [crowdin/github-action](https://github.com/crowdin/github-action) and [actions/github-script](https://github.com/actions/github-script). Updates `crowdin/github-action` from 2 to 3 - [Release notes](https://github.com/crowdin/github-action/releases) - [Commits](https://github.com/crowdin/github-action/compare/v2...v3) Updates `actions/github-script` from 7 to 9 - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v7...v9) --- updated-dependencies: - dependency-name: crowdin/github-action dependency-version: '3' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/github-script dependency-version: '9' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
84 lines
2.3 KiB
YAML
84 lines
2.3 KiB
YAML
name: Crowdin Sync
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 6 * * *"
|
|
workflow_dispatch:
|
|
inputs:
|
|
branch:
|
|
description: "Branch to sync translations into"
|
|
required: false
|
|
type: string
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
crowdin:
|
|
runs-on: blacksmith-2vcpu-ubuntu-2404
|
|
steps:
|
|
- name: Resolve target branch
|
|
id: branch
|
|
run: |
|
|
BRANCH="${{ inputs.branch }}"
|
|
if [ -z "$BRANCH" ]; then
|
|
BRANCH="${{ github.event.repository.default_branch }}"
|
|
fi
|
|
echo "name=$BRANCH" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Checkout branch
|
|
uses: actions/checkout@v7
|
|
with:
|
|
ref: ${{ steps.branch.outputs.name }}
|
|
fetch-depth: 0
|
|
token: ${{ secrets.GHCR_TOKEN }}
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v7
|
|
with:
|
|
node-version-file: ".nvmrc"
|
|
|
|
- name: Upload sources to Crowdin
|
|
uses: crowdin/github-action@v3
|
|
with:
|
|
upload_sources: true
|
|
upload_translations: false
|
|
download_translations: false
|
|
create_pull_request: false
|
|
push_translations: false
|
|
token: ${{ secrets.CROWDIN_API_KEY }}
|
|
project_id: "858252"
|
|
env:
|
|
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_KEY }}
|
|
|
|
- name: Machine pre-translate untranslated strings
|
|
env:
|
|
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}
|
|
run: node scripts/crowdin-pretranslate.cjs
|
|
|
|
- name: Download translations from Crowdin
|
|
uses: crowdin/github-action@v3
|
|
with:
|
|
upload_sources: false
|
|
upload_translations: false
|
|
download_translations: true
|
|
create_pull_request: false
|
|
push_translations: false
|
|
token: ${{ secrets.CROWDIN_API_KEY }}
|
|
project_id: "858252"
|
|
env:
|
|
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_KEY }}
|
|
|
|
- name: Commit translations
|
|
run: |
|
|
git config user.name "LukeGus"
|
|
git config user.email "bugattiguy527@gmail.com"
|
|
|
|
git add src/ui/locales/translated
|
|
if git diff --cached --quiet; then
|
|
echo "No translation changes to commit."
|
|
exit 0
|
|
fi
|
|
git commit -m "chore: sync Crowdin translations"
|
|
git push origin HEAD:"${{ steps.branch.outputs.name }}"
|