Download translation files from Localazy #22
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: Download translation files from Localazy | |
| on: | |
| workflow_dispatch: | |
| secrets: | |
| ELEMENT_BOT_TOKEN: | |
| required: true | |
| jobs: | |
| download: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout the code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| cache: "yarn" | |
| node-version-file: ".node-version" | |
| - name: Install Deps | |
| run: "yarn install --immutable" | |
| - name: Prune i18n | |
| run: "rm -R locales" | |
| - name: Download translation files | |
| uses: localazy/download@0a79880fb66150601e3b43606fab69c88123c087 # v1.1.0 | |
| with: | |
| groups: "-p includeSourceLang:true" | |
| - name: Fix the owner of the downloaded files | |
| run: "sudo chown runner:docker -R locales" | |
| - name: Prettier | |
| run: yarn prettier:format | |
| - name: Create Pull Request | |
| id: cpr | |
| uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 | |
| with: | |
| token: ${{ secrets.ELEMENT_BOT_TOKEN }} | |
| branch: actions/localazy-download | |
| delete-branch: true | |
| title: Localazy Download | |
| commit-message: Translations updates | |
| labels: | | |
| T-Task | |
| - name: Enable automerge | |
| run: gh pr merge --merge --auto "$PR_NUMBER" | |
| if: steps.cpr.outputs.pull-request-operation == 'created' | |
| env: | |
| GH_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} | |
| PR_NUMBER: ${{ steps.cpr.outputs.pull-request-number }} |