Update RBS collection #61
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/checkout@v4 | |
# https://github.com/ruby/setup-ruby | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.3" | |
bundler-cache: true | |
- name: Generate token | |
id: generate_token | |
uses: getsentry/action-github-app-token@v3 | |
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/read-file-action@v1 | |
with: | |
path: ../output.txt | |
# https://github.com/peter-evans/create-pull-request | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
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 |