diff --git a/.github/workflows/timezone-update.yml b/.github/workflows/timezone-update.yml index 12b93abceed7d0..00158082692fc6 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=$(cat ./test/fixtures/tz-version.txt)" >> $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 }}