Build README #451
This file contains hidden or 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: Build README | |
| on: | |
| push: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| #uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 | |
| # https://github.com/orgs/community/discussions/147696 | |
| uses: ruby/setup-ruby@086ffb1a2090c870a3f881cc91ea83aa4243d408 # v1.195.0 | |
| with: | |
| ruby-version: '2.7' | |
| bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
| - name: Update README | |
| run: ruby build_readme.rb | |
| - name: Commit and push if README has changed | |
| run: |- | |
| git diff | |
| git config --global user.email "readme-bot@unexist.dev" | |
| git config --global user.name "README-bot" | |
| git diff --quiet || (git add README.adoc && git commit -m "Updated README") | |
| git push |