Skip to content

Commit 6eeb7fe

Browse files
File sync from hanakai-rb/repo-sync
Updated files: - .github/workflows/rubocop.yml - .github/workflows/repo-sync-preview.yml
1 parent 0253fda commit 6eeb7fe

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Repo-sync preview
2+
3+
on:
4+
workflow_run:
5+
workflows: ["CI", "RuboCop"]
6+
types: [completed]
7+
branches:
8+
- "ci/repo-sync-preview-*"
9+
10+
jobs:
11+
report:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Dispatch status to repo-sync
15+
uses: actions/github-script@v7
16+
with:
17+
github-token: ${{ secrets.REPO_SYNC_DISPATCH_TOKEN }}
18+
script: |
19+
await github.rest.actions.createWorkflowDispatch({
20+
owner: "hanakai-rb",
21+
repo: "repo-sync",
22+
workflow_id: "aggregate-preview-status.yml",
23+
ref: "main",
24+
inputs: {
25+
pr_number: "${{ github.event.workflow_run.head_branch }}".replace("ci/repo-sync-preview-", ""),
26+
repo_name: "${{ github.repository }}",
27+
workflow_name: "${{ github.event.workflow_run.name }}",
28+
status: "${{ github.event.workflow_run.conclusion }}",
29+
run_url: "${{ github.event.workflow_run.html_url }}"
30+
}
31+
});

.github/workflows/rubocop.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ name: RuboCop
66

77
on:
88
push:
9-
branches: ["main"]
9+
branches: ["main", "release-*", "ci/*"]
10+
tags: ["v*"]
1011
pull_request:
11-
branches: ["main"]
12+
branches: ["main", "release-*"]
1213

1314
permissions:
1415
contents: read

0 commit comments

Comments
 (0)