Ruby #1464
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: Ruby | |
on: | |
schedule: | |
- cron: 0 0 * * * | |
workflow_dispatch: | |
jobs: | |
build: | |
if: github.repository_owner == 'Homebrew' || !github.event.schedule | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Set up Ruby 3 | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2 | |
- name: Configure git | |
run: | | |
git config user.email '[email protected]' | |
git config user.name 'TANIGUCHI Masaya' | |
- name: Convert and commit | |
run: | | |
git submodule update --init --remote | |
gem install bundler | |
bundle install --jobs 4 --retry 3 --without development | |
bundle exec ruby cask2formula convert | |
bundle exec ruby cask2formula commit | |
- name: Clean Formula directory | |
run: | | |
comm -23 --nocheck-order <(ls -1 Formula) <(ls -1 homebrew-cask-fonts/Casks) | xargs -I{} sh -c 'git rm ./Formula/{} && git commit -m "Remove {}"' | |
- name: Publish to GitHub | |
env: | |
TOKEN: ${{ secrets.PUSH_TOKEN }} | |
run: | | |
git push https://fgborges:${TOKEN}@github.com/Homebrew/homebrew-linux-fonts HEAD:master | |