forked from koluku/sudden-death
-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (48 loc) · 1.75 KB
/
pr-copy-ci-sudden-death.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: pr-copy-ci-sudden-death
on:
workflow_dispatch:
push:
branches:
- master
jobs:
# hato-botのCIの差分がpushされたらPRを作成する
pr-copy-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
fetch-depth: 0
path: sudden-death
ref: ${{ github.sha }}
token: ${{secrets.CREATE_WORKFLOW_CI_TOKEN}}
- name: Set org name
uses: actions/[email protected]
id: set_org_name
with:
github-token: ${{secrets.GITHUB_TOKEN}}
result-encoding: string
script: return process.env.GITHUB_REPOSITORY.split('/')[0]
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
fetch-depth: 0
repository: ${{steps.set_org_name.outputs.result}}/hato-bot
path: hato-bot
- name: Copy CI
run: bash "${GITHUB_WORKSPACE}/sudden-death/scripts/pr_copy_ci_sudden_death/pr_copy_ci/copy_ci.sh"
- name: Copy package.json
uses: actions/[email protected]
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const script = require(`${process.env.GITHUB_WORKSPACE}/sudden-death/scripts/pr_copy_ci_sudden_death/pr_copy_ci/copy_package.js`)
script()
- uses: dev-hato/[email protected]
with:
github-token: ${{secrets.GITHUB_TOKEN}}
branch-name-prefix: pr-copy-ci
pr-title-prefix: hato-botのCIを反映するよ!
working-directory: sudden-death
exit-failure: 'false'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true