Skip to content

Commit

Permalink
Workflow to update zonetab
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Aug 11, 2021
1 parent 0ed4474 commit b372907
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: update

on:
push:
schedule:
- cron: '0 10 * * 3'

jobs:

This comment has been minimized.

Copy link
@ritikesh

ritikesh Aug 20, 2021

Hi @nobu thanks for fixing this. Will there be an official release in ruby/date and ruby/ruby with this fix in the near future?

This comment has been minimized.

Copy link
@nobu

nobu Aug 22, 2021

Author Member

Though we have no release plan now, it should be.

update:
name: update zonetab
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
run: sudo apt-get --no-install-recommends -q -y install ruby-dev gperf
- name: Install dependencies
run: sudo gem install --no-document nokogiri
- name: Update zonetab
working-directory: ext/date
run: |
make -f prereq.mk update-zonetab
make -f prereq.mk zonetab.h
env:
top_srcdir: ../..
srcdir: .
RUBY: /usr/bin/ruby
- name: Check diffs
run: |
git config --global user.email "nobu@ruby-lang.org"
git config --global user.name "Nobuyoshi Nakada"
git commit --allow-empty --message="Update zonetab.h at $(date +%F)" ext/date
git diff --no-ext-diff --ignore-submodules --exit-code HEAD^..HEAD ||
{
git pull --ff-only origin ${GITHUB_REF#refs/heads/}
git push origin ${GITHUB_REF#refs/heads/}
}

0 comments on commit b372907

Please sign in to comment.