-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (46 loc) · 1.8 KB
/
api-ci-dev.yml
File metadata and controls
50 lines (46 loc) · 1.8 KB
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
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: api-ci-dev
on:
pull_request:
branches: [ dev ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: xt0rted/pull-request-comment-branch@v1
id: comment-branch
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Cache Gradle
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Lint-Check
id: lintCheck
run: ./gradlew ktlintCheck
- name: Comment when Lint was Failed
uses: peter-evans/create-or-update-comment@v2
if: failure() && steps.lintCheck.outcome == 'failure'
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
:x: Lint 실패
- name: Comment When All Step Was Passed
uses: peter-evans/create-or-update-comment@v2
if: success()
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
:white_check_mark: CI 통과