Skip to content

Commit 569bede

Browse files
committed
ICU-23473 Action for Automated CLDR Import
- update action a bit
1 parent 5336380 commit 569bede

1 file changed

Lines changed: 26 additions & 19 deletions

File tree

.github/workflows/cldr-integration.yml

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ env:
77
TOOLS_ROOT: ${{ github.workspace }}/icu/tools
88
ICU4J_DIR: ${{ github.workspace }}/icu/icu4j
99
CLDR_DATA_DIR: ${{ github.workspace }}/cldr-prod
10+
JDK_VERSION: 21
11+
JDK_DISTRO: temurin
1012

1113
on:
1214
workflow_dispatch:
@@ -34,18 +36,19 @@ jobs:
3436
runs-on: ubuntu-latest
3537
steps:
3638
- name: Clone CLDR
37-
uses: actions/checkout@v4
39+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3840
with:
3941
ref: ${{ github.event.inputs.cldr-ref }}
4042
lfs: false
4143
repository: ${{ github.event.inputs.cldr-repo }}
44+
persist-credentials: false
4245
- name: Set up JDK
43-
uses: actions/setup-java@v4
46+
uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0
4447
with:
45-
java-version: 21
46-
distribution: 'temurin'
48+
java-version: ${{ env.JDK_VERSION }}
49+
distribution: ${{ env.JDK_DISTRO }}
4750
- name: Cache local Maven repository
48-
uses: actions/cache@v4
51+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
4952
with:
5053
path: ~/.m2/repository
5154
key: ${{ runner.os }}-maven-${{ hashFiles('tools/**/pom.xml') }}
@@ -58,7 +61,7 @@ jobs:
5861
env:
5962
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6063
- name: Upload cldr-code
61-
uses: actions/upload-artifact@v4
64+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.4.0
6265
with:
6366
name: cldr-code
6467
path: tools/cldr-code/target/cldr-code.jar
@@ -73,7 +76,7 @@ jobs:
7376
env:
7477
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7578
- name: Upload cldr-prod
76-
uses: actions/upload-artifact@v4
79+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.4.0
7780
with:
7881
name: cldr-prod
7982
path: target/cldr-prod.zip
@@ -98,12 +101,12 @@ jobs:
98101
name: cldr-code
99102
path: cldr-code
100103
- name: Set up JDK
101-
uses: actions/setup-java@v4
104+
uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0
102105
with:
103-
java-version: 21
104-
distribution: 'temurin'
106+
java-version: ${{ env.JDK_VERSION }}
107+
distribution: ${{ env.JDK_DISTRO }}
105108
- name: Setup Maven Settings
106-
uses: s4u/maven-settings-action@v2.8.0
109+
uses: s4u/maven-settings-action@60912582505985be4cc55d2b890eb32767f8de5f # v2.8.0
107110
with:
108111
servers: |
109112
[{
@@ -122,21 +125,23 @@ jobs:
122125
- name: Create empty CLDR dir, unpack cldr-prod
123126
run: mkdir -p cldr cldr-prod && cd cldr-prod && unzip ../cldr-prod.zip
124127
- name: Clone CLDR
125-
uses: actions/checkout@v4
128+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
126129
with:
127130
ref: ${{ github.event.inputs.cldr-ref }}
128131
lfs: false
129132
repository: ${{ github.event.inputs.cldr-repo }}
130133
path: cldr
134+
persist-credentials: false
131135
- name: Clone ICU
132-
uses: actions/checkout@v4
136+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
133137
with:
134138
repository: ${{ github.event.inputs.icu-repo }}
135139
ref: ${{ github.event.inputs.icu-ref }}
136140
lfs: false # not needed here
137141
path: icu
142+
persist-credentials: false
138143
- name: Cache local Maven repository
139-
uses: actions/cache@v4
144+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
140145
with:
141146
path: ~/.m2/repository
142147
key: ${{ runner.os }}-maven-${{ hashFiles('icu/tools/**/pom.xml') }}
@@ -189,11 +194,12 @@ jobs:
189194
needs: genicudata
190195
steps:
191196
- name: Clone ICU
192-
uses: actions/checkout@v4
197+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
193198
with:
194199
repository: ${{ github.event.inputs.icu-repo }}
195200
ref: ${{ github.event.inputs.icu-ref }}
196201
lfs: false
202+
persist-credentials: false
197203
- name: Download icu-data.zip
198204
uses: actions/download-artifact@v4
199205
with:
@@ -233,11 +239,12 @@ jobs:
233239
needs: genicudata
234240
steps:
235241
- name: Clone ICU
236-
uses: actions/checkout@v4
242+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
237243
with:
238244
repository: ${{ github.event.inputs.icu-repo }}
239245
ref: ${{ github.event.inputs.icu-ref }}
240246
lfs: true
247+
persist-credentials: false
241248
- name: Checkout lfs objects
242249
run: git lfs pull
243250
- name: Download icu-data.zip
@@ -249,10 +256,10 @@ jobs:
249256
run: cd icu4c/source && rm -rf data && unzip -o ../../icu-data.zip
250257
- name: Generate ICU4J data
251258
run: cd icu4c/source && ./runConfigureICU Linux && make -j2 && make -C data icu4j-data-install ICU4J_ROOT=$(cd ../../icu4j ; pwd)
252-
- uses: actions/setup-java@v4
259+
- uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0
253260
with:
254-
java-version: '21' # For ICU4J
255-
distribution: 'temurin'
261+
java-version: ${{ env.JDK_VERSION }}
262+
distribution: ${{ env.JDK_DISTRO }}
256263
- name: ICU4J Build
257264
run: |
258265
cd icu4j;

0 commit comments

Comments
 (0)