Skip to content

Commit

Permalink
tools: check timezone current version
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-ippolito committed Dec 16, 2023
1 parent fa18378 commit c69d458
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/timezone-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit c69d458

Please sign in to comment.