Update RBS collection #36
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 RBS collection | |
on: | |
schedule: | |
# Run every Saturday at 10:00 JST. | |
- cron: "0 1 * * 6" | |
# For debug | |
workflow_dispatch: | |
jobs: | |
update-rbs-collection: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
# https://github.com/ruby/setup-ruby | |
- name: Setup Ruby | |
uses: ruby/[email protected] | |
with: | |
ruby-version: "3.3" | |
bundler-cache: true | |
- name: Generate token | |
id: generate_token | |
uses: getsentry/[email protected] | |
with: | |
app_id: ${{ secrets.KG8M_BOT_APP_ID }} | |
private_key: ${{ secrets.KG8M_BOT_PRIVATE_KEY }} | |
- name: Update RBS collection | |
run: bundle exec rbs collection update > ../output.txt | |
- name: Read ../output.txt | |
id: read-output | |
uses: juliangruber/[email protected] | |
with: | |
path: ../output.txt | |
# https://github.com/peter-evans/create-pull-request | |
- name: Create Pull Request | |
uses: peter-evans/[email protected] | |
with: | |
# Use my GitHub app’s temporary token because the default `GITHUB_TOKEN` prevents other workflows from being | |
# triggered when a pull request is created. | |
# cf. https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow | |
token: ${{ steps.generate_token.outputs.token }} | |
commit-message: | | |
Update RBS collection | |
```sh | |
$ bundle exec rbs collection update | |
``` | |
``` | |
${{ steps.read-output.outputs.content }} | |
``` | |
branch: update-rbs-collection | |
delete-branch: true | |
title: Update RBS collection | |
body: | | |
```sh | |
$ bundle exec rbs collection update | |
``` | |
``` | |
${{ steps.read-output.outputs.content }} | |
``` | |
labels: dependencies,dev-dependencies | |
assignees: kg8m |