Crowdin Daily Workflow #4
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
# Download translations from Crowdin and push to GitHub | |
name: Crowdin Daily Workflow | |
on: | |
schedule: | |
- cron: '0 0 * * *' # every day at midnight | |
permissions: | |
contents: read | |
jobs: | |
sync: | |
permissions: | |
contents: write # for Git to git push | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Java JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 18 | |
distribution: zulu | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Crowdin Sync | |
shell: bash | |
env: | |
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }} | |
run: | | |
cd intl | |
python3 -m pip install requests PyYAML | |
python3 crowdin_sync.py "$CROWDIN_API_KEY" | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git commit -m "Fetch translations from Crowdin" | |
git push |