-
Notifications
You must be signed in to change notification settings - Fork 367
106 lines (101 loc) · 3.33 KB
/
Copy pathi18n.yml
File metadata and controls
106 lines (101 loc) · 3.33 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Lingo.dev i18n
on:
push:
branches:
- main
workflow_dispatch:
inputs:
target:
description: Translation scope to run
required: true
default: all
type: choice
options:
- all
- ui
- docs
concurrency:
group: ${{ github.workflow }}-main
cancel-in-progress: false
permissions:
contents: write
pull-requests: write
jobs:
i18n-ui:
name: Run i18n for shared UI catalogs
concurrency:
group: ${{ github.workflow }}-i18n
cancel-in-progress: false
if:
github.event_name == 'push' || github.event.inputs.target == 'all' ||
github.event.inputs.target == 'ui'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: node scripts/i18n/verify-source-locales.mjs
- name: Run Lingo.dev
working-directory: packages/i18n
env:
LINGO_API_KEY: ${{ secrets.LINGODOTDEV_API_KEY }}
LINGODOTDEV_API_KEY: ${{ secrets.LINGODOTDEV_API_KEY }}
run: npx --yes lingo.dev@latest run
- name: Create signed pull request
id: create-pr
uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7
with:
sign-commits: true
commit-message: "i18n: Lingo Translation Update (ui)"
title: "i18n: Lingo (ui)"
body: "Automated Lingo.dev translation update for shared UI catalogs."
branch: i18n/lingo-ui
base: main
delete-branch: true
add-paths: |
packages/i18n/messages
packages/i18n/i18n.lock
- name: Verify pull request commits
if:
steps.create-pr.outputs.pull-request-operation != 'none' &&
steps.create-pr.outputs.pull-request-commits-verified != 'true'
run: |
echo "Pull request commits were not verified by GitHub."
exit 1
i18n-docs:
name: Run i18n for docs content
concurrency:
group: ${{ github.workflow }}-i18n
cancel-in-progress: false
if:
github.event_name == 'push' || github.event.inputs.target == 'all' ||
github.event.inputs.target == 'docs'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: node scripts/i18n/verify-source-locales.mjs
- name: Run Lingo.dev
working-directory: apps/docs
env:
LINGO_API_KEY: ${{ secrets.LINGODOTDEV_API_KEY }}
LINGODOTDEV_API_KEY: ${{ secrets.LINGODOTDEV_API_KEY }}
run: npx --yes lingo.dev@latest run
- name: Create signed pull request
id: create-pr
uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7
with:
sign-commits: true
commit-message: "i18n: Lingo Translation Update (docs)"
title: "i18n: Lingo (docs)"
body: "Automated Lingo.dev translation update for docs content."
branch: i18n/lingo-docs
base: main
delete-branch: true
add-paths: |
apps/docs/content
apps/docs/i18n.lock
- name: Verify pull request commits
if:
steps.create-pr.outputs.pull-request-operation != 'none' &&
steps.create-pr.outputs.pull-request-commits-verified != 'true'
run: |
echo "Pull request commits were not verified by GitHub."
exit 1