From c69d4584aa5571c474848d5679be67bcead3913f Mon Sep 17 00:00:00 2001 From: marco-ippolito Date: Sat, 16 Dec 2023 11:50:38 +0100 Subject: [PATCH 1/2] tools: check timezone current version --- .github/workflows/timezone-update.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/timezone-update.yml b/.github/workflows/timezone-update.yml index 12b93abceed7d0..26c16b8a294e0e 100644 --- a/.github/workflows/timezone-update.yml +++ b/.github/workflows/timezone-update.yml @@ -34,12 +34,22 @@ jobs: - name: Record new version run: echo "new_version=$(ls icu-data/tzdata/icunew | tail -1)" >> $GITHUB_ENV + - name: Record current version + run: echo "current_version=$(node -e 'console.log(process.versions.tz)')" >> $GITHUB_ENV + + - name: Compare versions + run: | + echo "Comparing current version ${{ env.current_version }} to new version ${{ env.new_version }}" + - run: ./tools/update-timezone.mjs + if: ${{ env.new_version != env.current_version }} - name: Update the expected timezone version in test + if: ${{ env.new_version != env.current_version }} run: echo "${{ env.new_version }}" > test/fixtures/tz-version.txt - name: Open Pull Request + if: ${{ env.new_version != env.current_version }} uses: gr2m/create-or-update-pull-request-action@77596e3166f328b24613f7082ab30bf2d93079d5 # Create a PR or update the Action's existing PR env: GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }} From 05faefbb06357d3bc9bb39d661e3e4e4073d7421 Mon Sep 17 00:00:00 2001 From: marco-ippolito Date: Sat, 16 Dec 2023 14:44:00 +0100 Subject: [PATCH 2/2] fix: use tz-version.txt --- .github/workflows/timezone-update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/timezone-update.yml b/.github/workflows/timezone-update.yml index 26c16b8a294e0e..00158082692fc6 100644 --- a/.github/workflows/timezone-update.yml +++ b/.github/workflows/timezone-update.yml @@ -35,7 +35,7 @@ jobs: run: echo "new_version=$(ls icu-data/tzdata/icunew | tail -1)" >> $GITHUB_ENV - name: Record current version - run: echo "current_version=$(node -e 'console.log(process.versions.tz)')" >> $GITHUB_ENV + run: echo "current_version=$(cat ./test/fixtures/tz-version.txt)" >> $GITHUB_ENV - name: Compare versions run: |