-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (75 loc) Β· 2.87 KB
/
pr_checker.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
84
85
86
87
88
name: Winey PR Checker
on:
pull_request:
branches: [ develop, main ]
defaults:
run:
shell: bash
working-directory: .
jobs:
build:
name: PR Checker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- 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: Setup JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Add Local Properties
env:
AUTH_BASE_URL: ${{ secrets.AUTH_BASE_URL }}
KAKAO_NATIVE_KEY: ${{ secrets.KAKAO_NATIVE_KEY }}
AMPLITUDE_API_KEY: ${{ secrets.AMPLITUDE_API_KEY }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
run: |
echo auth.base.url=\"$AUTH_BASE_URL\" >> ./local.properties
echo kakao.native.key=\"$KAKAO_NATIVE_KEY\" >> ./local.properties
echo amplitude.api.key=\"$AMPLITUDE_API_KEY\" >> ./local.properties
echo kakaoNativeKey=$KAKAO_NATIVE_KEY >> ./local.properties
echo keyAlias=$KEY_ALIAS >> ./local.properties
echo keyPassword=$KEY_PASSWORD >> ./local.properties
echo storePassword=$STORE_PASSWORD >> ./local.properties
- name: Build debug APK
run: ./gradlew assembleDebug --stacktrace
- name: Run ktlint
run: ./gradlew ktlintCheck
- name: On Success, Notify in Slack
if: ${{ success() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: '#53A551'
SLACK_ICON: https://github.com/team-winey/Winey-AOS/assets/68090939/d9f94086-84f5-4ef2-80b4-acf27b59c21b?size=48
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_TITLE: 'ALL Winey Android Makers checks have passed β
'
MSG_MINIMAL: true
SLACK_USERNAME: Winey Android
SLACK_MESSAGE: 'Winey Android PR check μ±κ³΅ πππ'
- name: On Failed, Notify in Slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: '#ff0000'
SLACK_ICON: https://github.com/team-winey/Winey-AOS/assets/68090939/d9f94086-84f5-4ef2-80b4-acf27b59c21b?size=48
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_TITLE: 'Winey checks have failed π«'
MSG_MINIMAL: true
SLACK_USERNAME: Winey Android
SLACK_MESSAGE: 'λ²κ·Έ μ‘μ π'