Skip to content

Commit 9b86b7a

Browse files
committed
Add repo-sync-preview-status.yml workflow for test
1 parent ac3651d commit 9b86b7a

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
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+
});

0 commit comments

Comments
 (0)