mirror of
https://github.com/ajnart/homarr.git
synced 2026-01-29 10:49:14 +01:00
50 lines
1.9 KiB
YAML
50 lines
1.9 KiB
YAML
name: "[Crowdin] Download translations"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 0 * * *" # every day at midnight
|
|
|
|
jobs:
|
|
download-crowdin-translations:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Obtain token
|
|
id: obtainToken
|
|
uses: tibdex/github-app-token@v2
|
|
with:
|
|
private_key: ${{ secrets.CROWDIN_APP_PRIVATE_KEY }}
|
|
app_id: ${{ secrets.CROWDIN_APP_ID }}
|
|
|
|
- name: Download Crowdin translations
|
|
id: crowdin-download
|
|
uses: crowdin/github-action@v2
|
|
with:
|
|
upload_sources: false
|
|
upload_translations: false
|
|
download_translations: true
|
|
localization_branch_name: crowdin
|
|
create_pull_request: true
|
|
pull_request_title: "chore(lang): updated translations from crowdin"
|
|
pull_request_body: "New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)"
|
|
commit_message: "chore(lang): update translations from crowdin"
|
|
pull_request_base_branch_name: "dev"
|
|
github_user_name: "Crowdin Homarr"
|
|
github_user_email: "190541745+homarr-crowdin[bot]@users.noreply.github.com"
|
|
skip_untranslated_strings: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ steps.obtainToken.outputs.token }}
|
|
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
|
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
|
|
|
- name: Enable auto-merge
|
|
if: steps.crowdin-download.outputs.pull_request_number != '' && steps.crowdin-download.outputs.pull_request_number != null
|
|
env:
|
|
GITHUB_TOKEN: ${{ steps.obtainToken.outputs.token }}
|
|
run: |
|
|
gh pr merge ${{steps.crowdin-download.outputs.pull_request_number}} --auto --squash --delete-branch --subject "chore(lang): updated translations from crowdin"
|