11name : Build JSP
22
33env :
4- CURRENT_UVERSION : 17.0.0 # FIX_FOR_NEW_VERSION
5- PREVIOUS_UVERSION : 16.0.0 # not used at present
4+ CURRENT_UVERSION : 18.0.0 # FIX_FOR_NEW_VERSION
5+ PREVIOUS_UVERSION : 17.0.0 # not used at present
6+ REGISTRY : ghcr.io
7+ IMAGE_NAME : ${{ github.repository }}
68
79on :
8- push :
9- branches :
10- - ' *'
1110 pull_request :
1211 branches :
1312 - ' *'
13+ push :
14+ tags :
15+ - ' *'
1416jobs :
1517 build :
1618 runs-on : ubuntu-latest
19+ permissions :
20+ contents : read
21+ packages : write
22+ attestations : write
23+ id-token : write
1724 steps :
18- - uses : actions/checkout@v3
25+ - uses : actions/checkout@v4
1926 - name : Get the CLDR_REF from pom.xml
2027 id : cldr_ref
2128 run : echo "CLDR_REF="$(mvn help:evaluate -Dexpression=cldr.version -q -DforceStdout | cut -d- -f3) >> $GITHUB_OUTPUT && cat ${GITHUB_OUTPUT}
2229 - name : Verify CLDR checkout ref
2330 run : echo CLDR_REF="${{ steps.cldr_ref.outputs.CLDR_REF }}" && [ "${{ steps.cldr_ref.outputs.CLDR_REF }}x" != "x" ] # fail if empty
2431 - name : Cache CLDR repository
25- uses : actions/cache@v3
32+ uses : actions/cache@v4
2633 with :
2734 path : cldr
2835 key : cldr-${{ steps.cldr_ref.outputs.CLDR_REF }}
2936 restore-keys : |
3037 cldr
3138 - name : Check out CLDR
32- uses : actions/checkout@v3
39+ uses : actions/checkout@v4
3340 with :
3441 repository : unicode-org/cldr
3542 path : cldr
@@ -45,12 +52,16 @@ jobs:
4552 with :
4653 java-version : 11
4754 - name : Cache local Maven repository
48- uses : actions/cache@v2
55+ uses : actions/cache@v4
4956 with :
5057 path : ~/.m2/repository
5158 key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
5259 restore-keys : |
5360 ${{ runner.os }}-maven-
61+ - name : Fetch Last Resort Font
62+ run : |
63+ wget https://github.com/unicode-org/last-resort-font/releases/latest/download/LastResort-Regular.ttf
64+ mv ./LastResort-Regular.ttf ./UnicodeJsps/src/main/webapp/
5465 # TODO: move this DOWN after JSPs once it works
5566 - name : Regenerate the property cache files
5667 run : >
@@ -69,10 +80,46 @@ jobs:
6980 env :
7081 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7182 - name : Upload UnicodeJsps.war
72- uses : actions/upload-artifact@v3
83+ uses : actions/upload-artifact@v4
7384 with :
7485 name : UnicodeJsps
7586 path : UnicodeJsps/target/UnicodeJsps.war
76- - name : build docker image
77- run : cd UnicodeJsps && bash update-bidic-ucd.sh && docker build .
78-
87+ - name : Build C Bidi
88+ run : cd UnicodeJsps && bash update-bidic-ucd.sh
89+ - name : Log in to the Container registry
90+ if : github.event_name != 'pull_request'
91+ uses : docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
92+ with :
93+ registry : ${{ env.REGISTRY }}
94+ username : ${{ github.actor }}
95+ password : ${{ secrets.GITHUB_TOKEN }}
96+ - name : Extract metadata (tags, labels) for Docker
97+ id : meta
98+ uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
99+ with :
100+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
101+ - name : Build and push Docker image
102+ if : github.event_name != 'pull_request'
103+ id : push
104+ uses : docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
105+ with :
106+ context : UnicodeJsps/
107+ push : true
108+ tags : ${{ steps.meta.outputs.tags }}
109+ labels : ${{ steps.meta.outputs.labels }}
110+ - name : Build and Docker image (PR)
111+ if : github.event_name == 'pull_request'
112+ id : builddocker
113+ uses : docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
114+ with :
115+ context : UnicodeJsps/
116+ push : false
117+ tags : ${{ steps.meta.outputs.tags }}
118+ labels : ${{ steps.meta.outputs.labels }}
119+ - name : Generate artifact attestation
120+ if : github.event_name != 'pull_request'
121+ uses : actions/attest-build-provenance@v2
122+ with :
123+ subject-name : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
124+ subject-digest : ${{ steps.push.outputs.digest }}
125+ push-to-registry : true
0 commit comments