diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4c114fb..5a7cab3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,13 @@ name: Build -on: [push] + +on: + push: + pull_request: + workflow_dispatch: + +concurrency: + group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' + cancel-in-progress: true jobs: build: @@ -7,16 +15,20 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 - with: - java-version: 11 - distribution: adopt - cache: gradle - - name: Build with Gradle - run: | - ./gradlew assemble - - name: Test with Gradle - run: | - unset GITHUB_ACTIONS - ./gradlew test + - uses: actions/checkout@v2 + + - uses: actions/setup-java@v3 + with: + java-version: 11 + distribution: adopt + + - uses: gradle/gradle-build-action@v2 + + - name: Build with Gradle + run: | + ./gradlew assemble + + - name: Test with Gradle + run: | + unset GITHUB_ACTIONS + ./gradlew test