-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13b4f71
commit f3c0c44
Showing
4 changed files
with
55 additions
and
44 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
.github/workflows/translations-pr.yml → ...flows/translations-pr-lint-and-format.yml
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# This action automates the synchronization of our crowdin translations, so that a human does not need to kick it off from the crowdin UI | ||
# See translations-pr-line-and-format.yml for quality control we conduct on ingress of new translations. | ||
name: Crowdin Sync | ||
|
||
on: | ||
schedule: | ||
- cron: '0 5 * * 5' # At 05:00 on Fridays. This guarantees that we have the 72 hour weekend time to review translations. | ||
|
||
# Cancel any runs on the same branch | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
# These permissions required by `crowdin/github-action` | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
synchronize-with-crowdin: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
# see all the options at https://github.com/crowdin/github-action | ||
- name: crowdin action | ||
uses: crowdin/github-action@2d540f18b0a416b1fbf2ee5be35841bd380fc1da #v2.3.0 | ||
with: | ||
upload_sources: true | ||
upload_translations: false #do not upload existing translations - this is a one-way operation | ||
# the rest of this controls how the PR comes in with new translations | ||
download_translations: true | ||
localization_branch_name: chore/crowdin | ||
create_pull_request: true | ||
pull_request_title: '[automated]: crowdin sync' | ||
pull_request_body: 'New Crowdin translations from the [Node.js Crowdin project](https://crowdin.com/project/nodejs-web)' | ||
pull_request_labels: github_actions:pull-request | ||
commit_message: 'chore: synced translations from crowdin [skip ci]' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
# A numeric ID, found at https://crowdin.com/project/nodejs-web/tools/api | ||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
# Created from https://crowdin.com/settings#api-key logged in using nodejs-crowdin-bot | ||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} |
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