Crowdin Action #16
Workflow file for this run
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: Crowdin Action | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
synchronize-with-crowdin: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.REPO_TOKEN }} | |
- name: Crowdin action | |
uses: crowdin/github-action@v2 | |
with: | |
upload_sources: true | |
upload_translations: false | |
download_translations: true | |
localization_branch_name: crowdin-localization | |
create_pull_request: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} | |
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | |
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | |
- name: Set file permissions | |
run: sudo chown -R $(whoami) . | |
- name: Create or update crowdin-localization branch | |
run: | | |
git config --global user.name "ejbills" | |
git config --global user.email "[email protected]" | |
git checkout crowdin-localization | |
git add . | |
git commit -m "chore: update translations from Crowdin" || echo "No changes to commit" | |
git push origin crowdin-localization --force | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
token: ${{ secrets.REPO_TOKEN }} | |
commit-message: "chore: update translations from Crowdin" | |
committer: GitHub <[email protected]> | |
author: ejbills <[email protected]> | |
signoff: false | |
branch: crowdin-localization | |
delete-branch: false | |
base: main | |
title: "chore: update translations from Crowdin" | |
body: | | |
This PR updates the translations from Crowdin. | |
labels: | | |
chore |