Skip to content

Commit 172a5ff

Browse files
committed
Add rbs-collection-updater
1 parent b614987 commit 172a5ff

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
- ".github/release.yml"
1515
- ".github/workflows/labeler.yml"
1616
- ".github/workflows/patch_for_go_gem.yml"
17+
- ".github/workflows/rbs-collection-updater.yml"
1718
- "_benchmark/**"
1819

1920
env:
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: rbs-collection-updater
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 1 * *" # Run monthly
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: ruby/setup-ruby@v1
16+
with:
17+
ruby-version: ruby
18+
bundler-cache: true
19+
20+
- run: bundle exec rbs collection update
21+
22+
- uses: actions/create-github-app-token@v1
23+
id: app-token
24+
with:
25+
app-id: ${{ secrets.GH_APP_ID }}
26+
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
27+
28+
- uses: peter-evans/create-pull-request@v7
29+
with:
30+
token: ${{ steps.app-token.outputs.token }}
31+
committer: GitHub <noreply@github.com>
32+
title: "Update rbs_collection.lock.yaml"
33+
commit-message: "Run `bundle exe rbs collection update`"
34+
35+
- name: Slack Notification
36+
uses: act10ns/slack@v2
37+
if: always()
38+
continue-on-error: true
39+
with:
40+
status: ${{ job.status }}
41+
webhook-url: ${{ secrets.SLACK_WEBHOOK }}

0 commit comments

Comments
 (0)