Skip to content

Commit 85fa2aa

Browse files
authored
Merge pull request #4005 from k0kubun/ruby-4.0-auto-sync
[ruby-4.0] Support auto-sync for ruby-4.0 branch
2 parents a7a22bc + a86e17a commit 85fa2aa

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @k0kubun

.github/workflows/sync-ruby.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Sync ruby
22
on:
33
push:
4-
branches: [main]
4+
branches: [main, ruby-4.0]
55
jobs:
66
sync:
77
name: Sync ruby
@@ -10,6 +10,14 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v6
1212

13+
- name: Set ruby/ruby target branch
14+
id: target
15+
run: |
16+
case "$GITHUB_REF_NAME" in
17+
main) echo "ref=master" >> "$GITHUB_OUTPUT" ;;
18+
ruby-4.0) echo "ref=ruby_4_0" >> "$GITHUB_OUTPUT" ;;
19+
esac
20+
1321
- name: Create GitHub App token
1422
id: app-token
1523
uses: actions/create-github-app-token@v2
@@ -26,7 +34,7 @@ jobs:
2634
repo: ruby
2735
workflow_file_name: sync_default_gems.yml
2836
github_token: ${{ steps.app-token.outputs.token }}
29-
ref: master
37+
ref: ${{ steps.target.outputs.ref }}
3038
client_payload: |
3139
{"gem":"${{ github.event.repository.name }}","before":"${{ github.event.before }}","after":"${{ github.event.after }}"}
3240
propagate_failure: true

0 commit comments

Comments
 (0)