Skip to content

Commit 47427d9

Browse files
committed
update GHA
- enable concurrency cancellation (so newer commits will cancel previous commits - use gradle/gradle-build-action (supports Gradle build & config caches) - bump actions/setup-java
1 parent 1451423 commit 47427d9

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
11
name: Build
2-
on: [push]
2+
3+
on: [ push ]
4+
5+
concurrency:
6+
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
7+
cancel-in-progress: true
38

49
jobs:
510
build:
611

712
runs-on: ubuntu-latest
813

914
steps:
10-
- uses: actions/checkout@v2
11-
- uses: actions/setup-java@v2
12-
with:
13-
java-version: 11
14-
distribution: adopt
15-
cache: gradle
16-
- name: Build with Gradle
17-
run: |
18-
./gradlew assemble
19-
- name: Test with Gradle
20-
run: |
21-
unset GITHUB_ACTIONS
22-
./gradlew test
15+
- uses: actions/checkout@v2
16+
17+
- uses: actions/setup-java@v3
18+
with:
19+
java-version: 11
20+
distribution: adopt
21+
22+
- uses: gradle/gradle-build-action@v2
23+
24+
- name: Build with Gradle
25+
run: |
26+
./gradlew assemble
27+
28+
- name: Test with Gradle
29+
run: |
30+
unset GITHUB_ACTIONS
31+
./gradlew test

0 commit comments

Comments
 (0)