Skip to content

Commit 8e02d08

Browse files
marco-ippolitorichardlau
authored andcommitted
tools: check timezone current version
PR-URL: #51178 Refs: #51107 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
1 parent 04323fd commit 8e02d08

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/timezone-update.yml

+10
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,22 @@ jobs:
3434
- name: Record new version
3535
run: echo "new_version=$(ls icu-data/tzdata/icunew | tail -1)" >> $GITHUB_ENV
3636

37+
- name: Record current version
38+
run: echo "current_version=$(cat ./test/fixtures/tz-version.txt)" >> $GITHUB_ENV
39+
40+
- name: Compare versions
41+
run: |
42+
echo "Comparing current version ${{ env.current_version }} to new version ${{ env.new_version }}"
43+
3744
- run: ./tools/update-timezone.mjs
45+
if: ${{ env.new_version != env.current_version }}
3846

3947
- name: Update the expected timezone version in test
48+
if: ${{ env.new_version != env.current_version }}
4049
run: echo "${{ env.new_version }}" > test/fixtures/tz-version.txt
4150

4251
- name: Open Pull Request
52+
if: ${{ env.new_version != env.current_version }}
4353
uses: gr2m/create-or-update-pull-request-action@77596e3166f328b24613f7082ab30bf2d93079d5 # Create a PR or update the Action's existing PR
4454
env:
4555
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}

0 commit comments

Comments
 (0)