update #181
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: update | |
on: | |
schedule: | |
- cron: '0 10 * * 3' | |
jobs: | |
update: | |
if: ${{ startsWith(github.repository, 'ruby/') }} | |
name: update zonetab | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 | |
id: diff | |
run: | | |
git diff --no-ext-diff --ignore-submodules --exit-code || | |
echo "diff=true" >> $GITHUB_OUTPUT | |
- name: Commit | |
run: | | |
git commit --message="Update zonetab.h at $(date +%F)" ext/date | |
git pull --ff-only origin ${GITHUB_REF#refs/heads/} | |
git push origin ${GITHUB_REF#refs/heads/} | |
env: | |
EMAIL: [email protected] | |
GIT_AUTHOR_NAME: Nobuyoshi Nakada | |
GIT_COMMITTER_NAME: Nobuyoshi Nakada | |
if: ${{ steps.diff.outputs.diff }} |