Pull translations from Transifex #18
This file contains 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 translations from Transifex" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "42 1 * * 6" | |
jobs: | |
pull-translations: | |
if: github.repository == 'cataclysmbnteam/Cataclysm-BN' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: "Install Transifex CLI" | |
run: | | |
curl -sL https://github.com/transifex/cli/releases/download/v1.6.7/tx-linux-amd64.tar.gz | sudo tar zxvf - -C /usr/bin tx | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
with: | |
# https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#push-to-protected-branches | |
token: ${{ secrets.AUTO_COMMIT_PAT }} | |
- name: "Get current date" | |
id: get-timestamp | |
run: echo "time=$(date -u "+%F")" >> $GITHUB_OUTPUT | |
- name: "Pull translations" | |
run: tx pull --force | |
env: | |
TX_TOKEN: ${{ secrets.TX_TOKEN }} | |
- name: Show Changes | |
run: | | |
git status | |
git diff --numstat | |
- name: Create Commit | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
branch: main | |
commit_message: "feat(i18n): routine i18n updates on ${{ steps.get-timestamp.outputs.time }}" | |
commit_user_name: "github-actions[bot]" | |
commit_user_email: "github-actions[bot]@users.noreply.github.com" | |
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>" |