Pull from transifex #42
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: "Pull from transifex" | |
| on: | |
| schedule: | |
| - cron: "0 */12 * * *" | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| pull-strings-from-transifex: | |
| name: pull-strings-from-transifex | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Granting private modules access | |
| run: | | |
| git config --global url."https://${{ secrets.CI_PRIVATE_REPOS_GH_TOKEN }}:x-oauth-basic@github.com/".insteadOf "https://github.com/" | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: "Pull translations file" | |
| uses: transifex/cli-action@v2 | |
| with: | |
| token: ${{ secrets.TRANSIFEX_TOKEN }} | |
| args: pull | |
| - name: "Update translations" | |
| run: | | |
| git config user.name git | |
| git config user.email github-actions@github.com | |
| git ls-files --modified assets/locales | xargs git add | |
| git diff --cached --exit-code || git commit -m "updated translations..." && git push origin main |