Skip to content

Commit 3762004

Browse files
committed
CLDR-18999 auto generate production data if data ref is missing
1 parent 40751b2 commit 3762004

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/build-json.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ on:
2222
required: true
2323
default: 'unicode-org/cldr-staging'
2424
data-ref:
25-
description: 'Data (staging) ref/tag/branch to use'
26-
required: true
25+
description: 'Data (staging) ref/tag/branch to use (otherwise, generate production data)'
26+
required: false
2727
default: 'main'
2828
data-dir:
2929
description: 'Path in Data repo'
@@ -61,11 +61,19 @@ jobs:
6161
${{ runner.os }}-maven-
6262
- name: Clone Data
6363
uses: actions/checkout@v5
64+
if: github.event.inputs.data-ref != ''
6465
with:
6566
ref: ${{ github.event.inputs.data-ref }}
6667
repository: ${{ github.event.inputs.data-repo }}
6768
sparse-checkout: ${{ github.event.inputs.data-dir }}
6869
path: cldr-staging
70+
- name: Generate Production
71+
if: github.event.inputs.data-ref == ''
72+
run: |
73+
cd cldr
74+
mkdir -p ../cldr-staging/${{ github.event.inputs.data-dir }}
75+
mvn -s ../cldr/.github/workflows/mvn-settings.xml -B compile install package --file=tools/pom.xml -pl cldr-code
76+
mvn -s ../cldr/.github/workflows/mvn-settings.xml -B -DCLDR_DIR=$(pwd) -DCLDR_GITHUB_ANNOTATIONS=true --file=tools/pom.xml -pl cldr-code exec:java -Dexec.mainClass=org.unicode.cldr.tool.GenerateProductionData
6977
- name: Setup Config
7078
run: |
7179
cd cldr-json

0 commit comments

Comments
 (0)