.github/workflows/rbi-updater.yml
name: RBI Updater
on:
workflow_call:
jobs:
update-rbis:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ secrets.LUNCHMONEY_PAT_TOKEN }}
fetch-depth: 0
-
name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
-
name: Update RBIs
run: bin/toys rbi all_types
-
name: Commit RBIs
run: |
git config --local user.name "RBI Updater"
git config --local user.email action@github.com
git add sorbet/*
git diff-index --cached --quiet HEAD || git commit -m "[dependabot skip] Update RBIs"
-
name: Push changes
uses: ad-m/github-push-action@v0.8.0
with:
github_token: ${{ secrets.LUNCHMONEY_PAT_TOKEN }}
branch: ${{ github.ref }}