-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (51 loc) · 1.98 KB
/
Copy pathcrowdin.yml
File metadata and controls
57 lines (51 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: CrowdIn Translation PR
on:
schedule:
# Run every day at 10:50am UTC (5:50am EST). To avoid delays and possibly dropped jobs GitHub
# recommends not scheduling jobs at the top of the hour.
- cron: '50 10 * * *'
workflow_dispatch:
permissions:
id-token: write
contents: write
pull-requests: write
jobs:
download:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .tool-versions
- name: 📦 Install Dependencies
# Download packages from the registry instead of git-lfs to save git-lfs bandwidth
run: yarn cache clean && yarn install
- name: 🌐 Extract Translations
run: yarn extract
- name: 🔤🔽 CrowdIn Translations Download
run: yarn crowdin download translations
env:
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}
- name: 🔤 Sort Translations
run: yarn crowdin:sort-translations
- name: 🔀 Create PR
uses: peter-evans/create-pull-request@v7
env:
# Disable git hooks because we are only modifying translation files
HUSKY: 0
with:
branch: bot-update-translations
add-paths: |
public/locales/
# Sign commits so that the author is a bot
sign-commits: true
commit-message: Run `yarn extract` and `yarn crowdin:download`
title: '[no-Jira] Update translations'
body: |
Update translations with the latest labels extracted from the components and downloaded from CrowdIn.
Due to GitHub Actions restrictions, our `on: pull_request` CI workflow will not run automatically because this PR was created by a bot. To get it to run, a human will have to push a commit to the branch.
```sh
$ git switch bot-update-translations
$ git commit --allow-empty --message "Bump CI"
$ git push
```