Skip to content

Commit 9a0894b

Browse files
authored
Don't run full build on schedule, run it for "ready" label (#10154)
This implements @niloc132 's idea to run full build when a specific label is present. Also removes the scheduled build as it's enough to build each commit to `main` once (over the last year scheduled builds did not detect any flaky issues with GWT itself, they only fail sometimes because of some strange Ant issue). Demonstration PR: zbynek#4
1 parent 6fc71bb commit 9a0894b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/full-check.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
# build, though maven snapshots are not yet deployed.
55
name: Full build
66
on:
7-
schedule:
8-
# This time is selected to be early in the morning in NA/SA/EU/ME. This
9-
# only runs on the default branch.
10-
- cron: '0 6 * * *'
117
push:
128
# Build on pushes to main and release branches. For forks, the -test may
139
# be helpful to run tests when preparing a merge.
@@ -17,8 +13,11 @@ on:
1713
- '*-test'
1814
workflow_dispatch:
1915
# Allow running manually
16+
pull_request:
17+
types: [ labeled, synchronize ]
2018
jobs:
2119
build:
20+
if: ${{ !github.event.pull_request || contains(github.event.pull_request.labels.*.name, 'ready') }}
2221
runs-on: ubuntu-latest
2322
strategy:
2423
matrix:
@@ -85,7 +84,7 @@ jobs:
8584
- name: Set up sonatype credentials
8685
# Using the same java version as above, set up a settings.xml file
8786
uses: actions/setup-java@v4
88-
if: ${{ github.event_name == 'schedule' && github.repository_owner == 'gwtproject' && matrix.java-version == '21' }}
87+
if: ${{ github.event_name == 'push' && github.ref_name == 'main' && github.repository_owner == 'gwtproject' && matrix.java-version == '21' }}
8988
with:
9089
java-version: ${{ matrix.java-version }}
9190
distribution: 'temurin'
@@ -95,7 +94,7 @@ jobs:
9594
server-password: SONATYPE_PASSWORD
9695

9796
- name: Nightly builds should be deployed as snapshots to sonatype
98-
if: ${{ github.event_name == 'schedule' && github.repository_owner == 'gwtproject' && matrix.java-version == '21' }}
97+
if: ${{ github.event_name == 'push' && github.ref_name == 'main' && github.repository_owner == 'gwtproject' && matrix.java-version == '21' }}
9998
env:
10099
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
101100
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}

0 commit comments

Comments
 (0)