-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (59 loc) · 1.96 KB
/
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
name: ci
on: push
defaults:
run:
shell: bash
working-directory: .
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{secrets.ACCESS_TOKEN}}
submodules: true
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'semeru'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Change gradlew permissions
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew build
- name: On Success
if: ${{ success() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: '#53A551'
SLACK_ICON: https://github.com/hellokitty-coding-club/LGTM-Android/assets/59546818/603efae5-02ba-4065-ba7b-ea36bc88acb6
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_TITLE: '[BE] Build SUCCESS ✅'
MSG_MINIMAL: true
SLACK_USERNAME: Lighthouse
SLACK_MESSAGE: '빌드에 성공하였습니다'
- name: On Failed
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
with:
status: ${{ job.status }}
env:
SLACK_COLOR: '#ff0000'
SLACK_ICON: https://github.com/hellokitty-coding-club/LGTM-Android/assets/59546818/603efae5-02ba-4065-ba7b-ea36bc88acb6
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_TITLE: '[BE] Build Fail❌'
MSG_MINIMAL: ref, actions url, event, commit
SLACK_USERNAME: Lighthouse
SLACK_MESSAGE: '에러를 확인해주세요'