name: Cron / Crowdin Pull run-name: Crowdin Pull - ${{ github.event_name == 'workflow_dispatch' && 'Manual' || 'Scheduled' }} on: workflow_dispatch: schedule: # Run weekly on Sunday at 00:00 UTC - cron: '0 0 * * 0' permissions: {} jobs: crowdin-sync: name: Crowdin Pull - ${{ github.event_name }} runs-on: ubuntu-24.04 permissions: contents: read id-token: write steps: - name: Checkout repo uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false - name: Log in to Azure uses: bitwarden/gh-actions/azure-login@main with: subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} tenant_id: ${{ secrets.AZURE_TENANT_ID }} client_id: ${{ secrets.AZURE_CLIENT_ID }} - name: Get Azure Key Vault secrets id: get-kv-secrets uses: bitwarden/gh-actions/get-keyvault-secrets@main with: keyvault: gh-org-bitwarden secrets: "BW-GHAPP-ID,BW-GHAPP-KEY" - name: Retrieve secrets id: retrieve-secrets uses: bitwarden/gh-actions/get-keyvault-secrets@main with: keyvault: "gh-android" secrets: "CROWDIN-API-TOKEN" - name: Log out from Azure uses: bitwarden/gh-actions/azure-logout@main - name: Generate GH App token uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 id: app-token with: client-id: ${{ steps.get-kv-secrets.outputs.BW-GHAPP-ID }} private-key: ${{ steps.get-kv-secrets.outputs.BW-GHAPP-KEY }} permission-contents: write # for creating and pushing a new branch permission-pull-requests: write # for creating pull request - name: Download translations uses: crowdin/github-action@52aa776766211d83d975df51f3b9c53c2f8ba35f # v2.16.3 env: GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.CROWDIN-API-TOKEN }} _CROWDIN_PROJECT_ID: "269690" with: config: crowdin.yml upload_sources: false upload_translations: false download_translations: true github_user_name: "bitwarden-devops-bot" github_user_email: "106330231+bitwarden-devops-bot@users.noreply.github.com" commit_message: "Crowdin Pull" localization_branch_name: "crowdin-pull" create_pull_request: true pull_request_title: "Crowdin Pull" pull_request_body: ":inbox_tray: New translations received!" pull_request_labels: "automated-pr, t:misc"