-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (55 loc) ยท 1.63 KB
/
cicd.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: build Test
on:
pull_request:
branches:
- develop
push:
branches:
- 'feat/**'
- 'api/**'
- 'fix/**'
- 'design/**'
- 'style/**'
- 'chore/**'
- 'setting/**'
permissions:
contents: write
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ruby
gem install mustache --user-install
- name: Run build/test
run: |
echo "๐จ ๋น๋ ์คํ ์ค..."
sh ./build.sh
- name: Add bot comment to PR
if: success() && github.event_name == 'pull_request'
uses: actions/github-script@v6
with:
script: |
const prNumber = context.payload.pull_request.number;
await github.rest.issues.createComment({
issue_number: prNumber,
owner: context.repo.owner,
repo: context.repo.repo,
body: `โ
๋น๋ ์ฑ๊ณต์ ์ผ๋ก ์๋ฃ๋์์ง๋กฑ๋กฑ ๐ ๏ธ`
});
- name: Add failure comment to PR
if: failure() && github.event_name == 'pull_request'
uses: actions/github-script@v6
with:
script: |
const prNumber = context.payload.pull_request.number;
await github.rest.issues.createComment({
issue_number: prNumber,
owner: context.repo.owner,
repo: context.repo.repo,
body: `โ ๋น๋์ ์คํจํ์ต๋๋ค. ๋ค์ ๊ณ ์น๊ณ ์ค์
ใ
ใ
๐จ`
});