Skip to content

Commit 1ce9697

Browse files
author
Peter Bengtsson
authored
check out specific language repo (#32294)
1 parent bc27e0d commit 1ce9697

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/sync-search-elasticsearch.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ env:
3535
FREEZE: ${{ secrets.FREEZE }}
3636
ELASTICSEARCH_URL: ${{ secrets.ELASTICSEARCH_URL }}
3737

38+
# This might seem a bit strange, but it's clever. Since this action
39+
# uses a matrix to deal with one language at a time, we can use this
40+
# to pretend it's always the same directory.
41+
TRANSLATIONS_ROOT_ES_ES: translation
42+
TRANSLATIONS_ROOT_ZH_CN: translation
43+
TRANSLATIONS_ROOT_JA_JP: translation
44+
TRANSLATIONS_ROOT_PT_BR: translation
45+
TRANSLATIONS_ROOT_FR_FR: translation
46+
TRANSLATIONS_ROOT_RU_RU: translation
47+
TRANSLATIONS_ROOT_KO_KR: translation
48+
TRANSLATIONS_ROOT_DE_DE: translation
49+
3850
jobs:
3951
figureOutMatrix:
4052
runs-on: ubuntu-latest
@@ -98,6 +110,14 @@ jobs:
98110
- name: Check out repo
99111
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
100112

113+
- name: Checkout the non-English repo
114+
if: ${{ matrix.language != 'en' }}
115+
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
116+
with:
117+
repository: github/docs-internal.${{ fromJSON('{"cn":"zh-cn","es":"es-es","ru":"ru-ru","ja":"ja-jp","pt":"pt-br","de":"de-de","fr":"fr-fr","ko":"ko-kr"}')[matrix.language] }}
118+
token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
119+
path: translation
120+
101121
- name: Setup Node
102122
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
103123
with:

0 commit comments

Comments
 (0)