ASF-ui-translations #1500
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: ASF-ui-translations | |
on: | |
schedule: | |
- cron: '0 2 * * *' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
update: | |
environment: dev-crowdin | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4.1.7 | |
with: | |
show-progress: false | |
token: ${{ secrets.ARCHIBOT_ASF_UI_GITHUB_TOKEN }} | |
- name: Download latest translations from Crowdin | |
uses: crowdin/github-action@v2.1.1 | |
with: | |
upload_sources: false | |
download_translations: true | |
skip_untranslated_strings: true | |
push_translations: false | |
crowdin_branch_name: main | |
config: '.github/crowdin.yml' | |
project_id: ${{ secrets.ASF_CROWDIN_PROJECT_ID }} | |
token: ${{ secrets.ASF_CROWDIN_API_TOKEN }} | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v6.1.0 | |
with: | |
gpg_private_key: ${{ secrets.ARCHIBOT_ASF_UI_GPG_PRIVATE_KEY }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: Commit the changes | |
shell: sh | |
run: | | |
set -eu | |
git add -A "src/i18n/locale" | |
if ! git diff --cached --quiet; then | |
git commit -m "Automatic translations update" | |
fi | |
- name: Push changes | |
uses: ad-m/github-push-action@v0.8.0 | |
with: | |
github_token: ${{ secrets.ARCHIBOT_ASF_UI_GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |