Update works #1276
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 works | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'ci skip')" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby 2.6 | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.6' | |
bundler-cache: true | |
- name: checkout aozorabuno.git | |
run: | | |
git clone --depth 1 https://github.com/aozorabunko/aozorabunko.git | |
- name: copy only zip files | |
run: | | |
mkdir aozora_zip | |
cd aozorabunko | |
cp --parents cards/*/*/*.zip ../aozora_zip/ | |
- name: Build and exec extzip.rb | |
run: | | |
gem install bundler | |
bundle install --jobs 4 --retry 3 | |
bundle exec ruby .github/workflows/extzip.rb | |
cd aozora_zip && cp --parents cards/*/*/*/*.txt .. | |
- name: git config && commit | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "github-actions-bot" | |
git add --all cards | |
CURDATE=`date "+%Y%m%d"` | |
git commit -m "[ci skip] update texts ${CURDATE}" | |
- name: push | |
run: | | |
git remote set-url origin https://${{github.actor}}:${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}.git | |
git push origin HEAD:master |