mirror of
https://github.com/nodejs/node.git
synced 2024-11-24 03:07:54 +01:00
ba907d6088
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.0 to 4.2.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](d632683dd7...11bd71901b
)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/55683
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
73 lines
2.6 KiB
YAML
73 lines
2.6 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Checkout unicode-org/icu-data
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
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
|
|
|
|
- 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 }}
|
|
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/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
|
|
update-pull-request-title-and-body: true
|