-
Notifications
You must be signed in to change notification settings - Fork 18
43 lines (36 loc) · 1.04 KB
/
base.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
on:
workflow_call:
inputs:
gradle-task:
description: Which task to run in the workflow
type: string
artifacts:
description: Files to save after job run. Accepts wildcard
type: string
default: ""
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Setup local.properties
run: touch local.properties
- name: Build with Gradle
run: ./gradlew ${{ inputs.gradle-task }}
- name: Archive artifacts
uses: actions/upload-artifact@v3
if: ${{ failure() && inputs.artifacts != '' }}
with:
retention-days: 5
if-no-files-found: ignore
path: ${{ inputs.artifacts }}