Skip to content

Commit 63afb51

Browse files
committed
Refactor workflow
- rename to 'Build' - add push trigger on main branch - Update Gradle setup
1 parent c455974 commit 63afb51

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/validate-pr.yml renamed to .github/workflows/build.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
name: Validate PR
1+
name: Build
22

33
on:
44
workflow_dispatch:
55
pull_request:
66
branches: [ main ]
7+
push:
8+
branches: [ main ]
79

810
concurrency:
911
group: ${{ github.workflow }}-${{ github.ref }}
@@ -24,9 +26,12 @@ jobs:
2426

2527
- name: Setup Gradle
2628
uses: gradle/actions/setup-gradle@v4
29+
with:
30+
add-job-summary: 'always'
31+
cache-read-only: true
2732

28-
- name: Clean Build with Gradle
29-
run: ./gradlew clean build
33+
- name: Build with Gradle
34+
run: ./gradlew clean check
3035

3136
- name: Upload JUnit test results
3237
if: always()
@@ -36,7 +41,7 @@ jobs:
3641
path: '**/build/test-results/test/*.xml'
3742

3843
- name: Disable Auto-Merge on Fail
39-
if: failure()
44+
if: failure() && github.event_name != 'pull_request'
4045
run: gh pr merge --disable-auto "$PR_URL"
4146
env:
4247
PR_URL: ${{github.event.pull_request.html_url}}

0 commit comments

Comments
 (0)