Skip to content

Commit

Permalink
tools: add skeleton for automate time zone update
Browse files Browse the repository at this point in the history
  • Loading branch information
98lenvi committed Jul 25, 2022
1 parent 2e4bcfc commit 0eda4e0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/timezone-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Timezone update
on:
schedule:
# Run once a week at 00:05 AM UTC on Sunday.
- cron: 5 0 * * 0

workflow_dispatch:

jobs:
authors_update:
if: github.repository == 'nodejs/node'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0' # This is required to actually get all the authors
persist-credentials: false
- run: tools/update-timezone.js # Run the timezone tool
- uses: gr2m/create-or-update-pull-request-action@v1 # 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.
commit-message: 'meta: update timezone'
labels: meta
title: 'meta: update timezone'
5 changes: 5 additions & 0 deletions tools/update-timezone.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env node
// Usage: tools/update-timezone.mjs [--dry]
// Passing --dry will redirect output to stdout.

console.log('Initial Skeleton');

0 comments on commit 0eda4e0

Please sign in to comment.