mirror of
https://github.com/nodejs/node.git
synced 2024-11-25 08:19:38 +01:00
0094f90c8a
Signed-off-by: Gabriela Gutierrez <gabigutierrez@google.com> PR-URL: https://github.com/nodejs/node/pull/46820 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
62 lines
2.1 KiB
YAML
62 lines
2.1 KiB
YAML
name: Timezone update
|
|
on:
|
|
schedule:
|
|
# Run once a week at 00:05 AM UTC on Sunday.
|
|
- cron: 5 0 * * 0
|
|
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
timezone_update:
|
|
permissions:
|
|
contents: write # to push local changes (gr2m/create-or-update-pull-request-action)
|
|
pull-requests: write # to create a PR (gr2m/create-or-update-pull-request-action)
|
|
|
|
if: github.repository == 'nodejs/node'
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout nodejs/node
|
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Checkout unicode-org/icu-data
|
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
|
with:
|
|
path: icu-data
|
|
persist-credentials: false
|
|
repository: unicode-org/icu-data
|
|
|
|
- name: Record new version
|
|
run: echo "new_version=$(ls icu-data/tzdata/icunew | tail -1)" >> $GITHUB_ENV
|
|
|
|
- run: ./tools/update-timezone.mjs
|
|
|
|
- name: Update the expected timezone version in test
|
|
run: echo "${{ env.new_version }}" > test/fixtures/tz-version.txt
|
|
|
|
- name: Open Pull Request
|
|
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 }}
|
|
with:
|
|
author: Node.js GitHub Bot <github-bot@iojs.org>
|
|
body: |
|
|
This PR was generated by tools/timezone-update.yml.
|
|
|
|
Updates the ICU files as per the instructions present in https://github.com/nodejs/node/blob/main/doc/contributing/maintaining-icu.md#time-zone-data
|
|
|
|
To test, build node off this branch & log the version of tz using
|
|
```js
|
|
console.log(process.versions.tz)
|
|
```
|
|
branch: actions/timezone-update
|
|
commit-message: 'deps: update timezone to ${{ env.new_version }}'
|
|
labels: dependencies
|
|
title: 'deps: update timezone to ${{ env.new_version }}'
|
|
reviewers: \@nodejs/i18n-api
|