File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 1- name : Validate PR
1+ name : Build
22
33on :
44 workflow_dispatch :
55 pull_request :
66 branches : [ main ]
7+ push :
8+ branches : [ main ]
79
810concurrency :
9- group : ${{ github.workflow }}-${{ github.ref }}
10- cancel-in-progress : true
11+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+ # Cancel only when the run is NOT on `main` branch
13+ cancel-in-progress : ${{ github.ref != 'refs/heads/main' }}
1114
1215jobs :
1316 validate-pr :
2427
2528 - name : Setup Gradle
2629 uses : gradle/actions/setup-gradle@v4
30+ with :
31+ add-job-summary : ' always'
32+ cache-read-only : true
2733
28- - name : Clean Build with Gradle
34+ - name : Build with Gradle
2935 run : ./gradlew clean build
3036
3137 - name : Upload JUnit test results
3642 path : ' **/build/test-results/test/*.xml'
3743
3844 - name : Disable Auto-Merge on Fail
39- if : failure()
45+ if : failure() && github.event_name != 'pull_request'
4046 run : gh pr merge --disable-auto "$PR_URL"
4147 env :
4248 PR_URL : ${{github.event.pull_request.html_url}}
You can’t perform that action at this time.
0 commit comments