-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (64 loc) · 2.27 KB
/
crowdin.yaml
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
58
59
60
61
62
63
64
65
66
67
68
name: Crowdin
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
permissions:
contents: write
jobs:
crowdin-pv:
runs-on: ubuntu-latest
container:
image: crowdin/cli:4.1.2
env:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID_PV }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN_PV }}
steps:
- name: Configure Git
run: |
apk --no-cache add curl git git-lfs jq gnupg
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v4
with:
ref: pv
- name: Download crowdin bundles
run: |
find . -mindepth 1 -maxdepth 1 -not -name ".git" -exec rm -rfv {} +
crowdin bundle download 2
crowdin bundle download 4
find . -type f -empty -print -delete
find . -type d -empty -print -delete
- name: Push crowdin changes
run: |
git add .
(git commit -am "Crowdin download" && git push) || echo "No changes to commit"
crowdin-addons:
runs-on: ubuntu-latest
container:
image: crowdin/cli:4.1.2
env:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID_ADDONS }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN_ADDONS }}
steps:
- name: Configure Git
run: |
apk --no-cache add curl git git-lfs jq gnupg
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v4
with:
ref: addons
- name: Download crowdin bundles
run: |
find . -mindepth 1 -maxdepth 1 -not -name ".git" -exec rm -rfv {} +
crowdin bundle download 8
crowdin bundle download 10
find . -type f -empty -print -delete
find . -type d -empty -print -delete
- name: Push crowdin changes
run: |
git add .
(git commit -am "Crowdin download" && git push) || echo "No changes to commit"