Skip to content

Commit

Permalink
tools: fix action
Browse files Browse the repository at this point in the history
  • Loading branch information
98lenvi committed Jul 26, 2022
1 parent 1e7f1ec commit c99d41c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/timezone-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,34 @@ jobs:
timezone_update:
if: github.repository == 'nodejs/node'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: checkout repo
uses: actions/checkout@v3
with:
fetch-depth: '0'
persist-credentials: false
- uses: actions/checkout@v3

- name: fetch icu-data
uses: actions/checkout@v3
with:
name: 'unicode-org/icu-data'
ref: refs/heads/release
- run: tools/update-timezone.mjs # Run the timezone tool
- uses: gr2m/create-or-update-pull-request-action@6720400cad8e74d7adc64640e4e6ea6748b83d8f # Create a PR or update the Action's existing PR
fetch-depth: '0'
path: icu-data
persist-credentials: false
repository: unicode-org/icu-data

- name: update icudata file
run: tools/update-timezone.mjs

- name: open pull request
uses: gr2m/create-or-update-pull-request-action@6720400cad8e74d7adc64640e4e6ea6748b83d8f # 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: >
updates the ICU files
branch: actions/timezone-update # Custom branch *just* for this Action.
branch: actions/timezone-update
commit-message: 'meta: update timezone'
labels: meta
title: 'meta: update timezone'
4 changes: 2 additions & 2 deletions tools/update-timezone.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ fileNames.forEach((file) => {
);
spawnSync(
'rm', [
file
file,
], { cwd: 'deps/icu-small/source/data/in/' }
)
);
});
execSync('bzip2 -z deps/icu-small/source/data/in/icudt*.dat');
execSync('rm -rf icu-data');

0 comments on commit c99d41c

Please sign in to comment.