-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (75 loc) ยท 3.91 KB
/
kakao_ci.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: BE CI
run-name: Deploy by @${{ github.actor }}
on:
push:
branches:
- main
- develop
pull_request:
types: [review_requested, opened, reopened, ready_for_review]
pull_request_review:
types: [submitted]
jobs:
build-and-notify:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Determine event type and trigger action at Windows
if: runner.os == 'Windows'
run: |
if ( "${{github.event_name}}" -eq "push" ) {
$TITLE="[${{github.actor}}]_${{ github.event_name }}"
$DESC="${{ github.event.head_commit.message }}".split("`n")[0]
echo "TITLE=$TITLE" >> $env:GITHUB_OUTPUT
echo "DESC=$DESC" >> $env:GITHUB_OUTPUT
} elseif ( "${{github.event_name}}" -eq "pull_request" ) {
$TITLE="[${{github.actor}}]_${{ github.event_name }}"
$DESC="${{ github.event.pull_request.title }}".split("`n")[0]
echo "TITLE=$TITLE" >> $env:GITHUB_OUTPUT
echo "DESC=$DESC" >> $env:GITHUB_OUTPUT
} elseif ( "${{github.event_name}}" -eq "pull_request_review" ) {
$TITLE="${{github.actor}}]_${{ github.event_name }}"
$DESC="${{ github.event.pull_request.title }}".split("`n")[0]
echo "TITLE=$TITLE" >> $env:GITHUB_OUTPUT
echo "DESC=$DESC" >> $env:GITHUB_OUTPUT
}
id: determine_event_type_windows
- name: Determine event type and trigger action at macOS
if: runner.os == 'macOS'
run: |
if [ ${{github.event_name}} == 'push' ]; then
echo "TITLE=[${{github.actor}}]_${{ github.event_name }}" >> $GITHUB_OUTPUT
echo "DESC='$(echo '${{ github.event.head_commit.message }}' | awk '{printf "%s", $0}')'" >> $GITHUB_OUTPUT
elif [ ${{github.event_name}} == 'pull_request' ]; then
echo "TITLE='[${{github.actor}}]_${{ github.event_name }}'" >> $GITHUB_OUTPUT
echo "DESC='$(echo '${{ github.event.pull_request.title }}' | awk '{printf "%s", $0}')'" >> $GITHUB_OUTPUT
elif [ ${{github.event_name}} == 'pull_request_review' ]; then
echo "TITLE='[${{github.actor}}]_${{ github.event_name }}'" >> $GITHUB_OUTPUT
echo "DESC='$(echo '${{ github.event.pull_request.title }}' | awk '{printf "%s", $0}')'" >> $GITHUB_OUTPUT
fi
id: determine_event_type_mac
- name: run kakao-chat
if: runner.os == 'Windows'
uses: psychology50/kakao-chat-ci@main
env:
KAKAO_CLIENT: ${{ secrets.KAKAO_CLIENT }}
KAKAO_EMAIL: ${{ secrets.KAKAO_EMAIL }}
KAKAO_PASSWORD: ${{ secrets.KAKAO_PASSWORD }}
KAKAO_TEMPLATE_ID: 97232
KAKAO_SENDER_TEMPLATE_ID: 97280
KAKAO_REDIRECT_URL: http://localhost:3000/oauth/kakao/callback
TITLE: ${{ steps.determine_event_type_mac.outputs.TITLE }}
DESC: ${{ steps.determine_event_type_mac.outputs.DESC }}
- name: run kakao-chat
if: runner.os == 'macOS'
uses: psychology50/kakao-chat-ci@main
env:
KAKAO_CLIENT: ${{ secrets.KAKAO_CLIENT }}
KAKAO_EMAIL: ${{ secrets.KAKAO_EMAIL }}
KAKAO_PASSWORD: ${{ secrets.KAKAO_PASSWORD }}
KAKAO_TEMPLATE_ID: 97232
KAKAO_SENDER_TEMPLATE_ID: 97280
KAKAO_REDIRECT_URL: http://localhost:3000/oauth/kakao/callback
TITLE: ${{ steps.determine_event_type_mac.outputs.TITLE }}
DESC: ${{ steps.determine_event_type_mac.outputs.DESC }}