feat(crowdin): workflow setup testing #17
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CrowdIn Flow | |
| on: | |
| push: | |
| branches: | |
| - feat/crowdin | |
| paths: | |
| - 'projects/client/i18n/meta/**' | |
| jobs: | |
| files-changed: | |
| name: The Scrutiny of Change | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: i18n-${{ github.ref }} | |
| cancel-in-progress: true | |
| outputs: | |
| i18n_source: ${{ steps.changes.outputs.i18n_source }} | |
| steps: | |
| - name: Unveiling the Repository | |
| uses: actions/checkout@v4 | |
| - name: The Chronicle of Alterations | |
| uses: dorny/paths-filter@v3 | |
| id: changes | |
| with: | |
| filters: | | |
| i18n_source: | |
| - 'projects/client/i18n/meta/**' | |
| crowdin: | |
| needs: files-changed | |
| if: ${{ needs.files-changed.outputs.i18n_source == 'true' }} | |
| name: The Translation Room (CrowdIn) | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: i18n-${{ github.ref }} | |
| cancel-in-progress: true | |
| steps: | |
| - name: Summoning the GitHub App Token | |
| uses: actions/create-github-app-token@v2 | |
| id: generate-token | |
| with: | |
| app-id: ${{ secrets.GH_APP_ID }} | |
| private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
| permission-contents: write | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ steps.generate-token.outputs.token }} | |
| - name: Upload Sources to Crowdin | |
| uses: crowdin/github-action@v2 | |
| with: | |
| upload_sources: true | |
| env: | |
| CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | |
| CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | |
| - name: Pre-Translate | |
| uses: crowdin/github-action@v2 | |
| with: | |
| command: 'pre-translate' | |
| command_args: '--method ai --ai-prompt=${{ secrets.CROWDIN_AI_PROMPT_ID }}' | |
| env: | |
| CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | |
| CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | |
| - name: Download Bundles | |
| uses: crowdin/github-action@v2 | |
| with: | |
| upload_sources: false | |
| upload_translations: false | |
| download_translations: false | |
| download_bundle: 6 | |
| skip_untranslated_strings: true | |
| create_pull_request: false | |
| localization_branch_name: feat/crowdin | |
| commit_message: 'feat(i18n): update translations' | |
| env: | |
| GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} | |
| CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | |
| CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} |