-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (62 loc) · 2.03 KB
/
pr_builder.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
name: TelePigeon PR Builder
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@v2
- name: Gradle cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Change gradlew permissions
run: chmod +x ./gradlew
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Touch local properties
run: touch local.properties
- name: Decode google-services.json
env:
FIREBASE_SECRET: ${{ secrets.FIREBASE_SECRET }}
run: echo $FIREBASE_SECRET > app/google-services.json
- name: Access BASE_URL
env:
HFM_BASE_URL: ${{ secrets.BASE_URL }}
run: echo "base.url=\"$BASE_URL\"" >> local.properties
- name: Access IO_SENTRY_DSN
env:
IO_SENTRY_DSN: ${{ secrets.IO_SENTRY_DSN }}
run: echo "io.sentry.dsn=\"$IO_SENTRY_DSN\"" >> local.properties
- name: Access DEFAULTS_ORG
env:
DEFAULTS_ORG: ${{ secrets.DEFAULTS_ORG }}
run: echo "defaults.org=$DEFAULTS_ORG" >> sentry.properties
- name: Access DEFAULTS_PROJECT
env:
DEFAULTS_PROJECT: ${{ secrets.DEFAULTS_PROJECT }}
run: echo "defaults.project=$DEFAULTS_PROJECT" >> sentry.properties
- name: Access AUTH_TOKEN
env:
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
run: echo "auth.token=$AUTH_TOKEN" >> sentry.properties
- name: Lint Check
run: ./gradlew ktlintCheck -PcompileSdkVersion=34
- name: Build with Gradle
run: ./gradlew build -PcompileSdkVersion=34