-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (71 loc) Β· 2.47 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
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 }}
run: |
echo auth.base.url=$AUTH_BASE_URL >> ./local.properties
# - name: Access Firebase Service
# run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json
- name: Build debug APK
run: ./gradlew assembleDebug --stacktrace
# - name: Upload APK
# uses: actions/upload-artifact@v1
# with:
# name: app
# path: app/build/outputs/apk/debug
- 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: 'λ²κ·Έ μ‘μ π'