Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: check timezone current version #51178

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
marco-ippolito marked this conversation as resolved.
Show resolved Hide resolved

- 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