name: Pull Translations from Crowdin
on:
  schedule:
    - cron: "0 0 * * *"
  workflow_dispatch:
jobs:
  pull-from-crowdin:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Pull translations from Crowdin
        uses: crowdin/github-action@2cc7959c565767d6bc118118d6df3b63bf361370 # v2.6.1
        with:
          upload_sources: false
          download_translations: true
          create_pull_request: true
          localization_branch_name: automated-translations-update
          pull_request_title: "GH Auto: Automated Update of Translations from Crowdin"
          pull_request_base_branch_name: develop
        env:
          GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
          CROWDIN_TOKEN: ${{ secrets.CROWDIN_TRANSLATIONS_TOKEN }}
