-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (43 loc) · 1.39 KB
/
build.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
name: ✨ YELL:O Build
on:
pull_request:
branches: [ "main", "develop" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: 👉 JDK 17 zulu 버전을 세팅합니다.
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: 🐘 Gradle에 권한을 부여합니다.
run: chmod +x gradlew
shell: bash
## 시크릿 키 설정
- name: 🔐 application.yml 등 환경 변수를 세팅합니다.
run: |
cd ./src/main/resources
touch ./application.yml
echo "$APPLICATION" > ./application.yml
env:
APPLICATION: ${{ secrets.APPLICATION }}
shell: bash
- name: 🐘 Gradle로 빌드 실행
run: ./gradlew build -x test
- name: 💡 배포 상태를 Slack을 통해 전송합니다.
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: general
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: https://github.com/rtCamp.png?size=48
SLACK_MESSAGE: 빌드에 ${{ job.status }} 했습니다.
SLACK_TITLE: 📦 YELL:O 빌드 결과 📦
SLACK_USERNAME: Notification-Bot
SLACK_WEBHOOK: ${{ secrets.SLACK_URL }}
if: always()