From 49eea5334047f4778f1bc2b244757d75ef66ba4a Mon Sep 17 00:00:00 2001 From: marionbarker Date: Sun, 19 Jul 2026 18:55:19 -0700 Subject: [PATCH] improve clarity: when build is skipped, run is canceled no green check mark is shown --- .github/workflows/build_loop_auto.yml | 24 ++++++++++++++++++++++++ fastlane/testflight.md | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_loop_auto.yml b/.github/workflows/build_loop_auto.yml index b371b01523..5d2d647be3 100644 --- a/.github/workflows/build_loop_auto.yml +++ b/.github/workflows/build_loop_auto.yml @@ -148,6 +148,30 @@ jobs: echo "is_second_instance=false" >> "$GITHUB_OUTPUT" fi + # When a scheduled run finds nothing new to build, cancel the run so it shows + # as "cancelled" instead of "success" — a green check should always mean a + # new build was made. + cancel_when_no_build: + needs: check_status + name: Cancel run when there is nothing to build + runs-on: ubuntu-latest + permissions: + actions: write + if: | + github.event_name == 'schedule' && + !(vars.SCHEDULED_BUILD != 'false' && needs.check_status.outputs.IS_SECOND_IN_MONTH == 'true') && + !(vars.SCHEDULED_SYNC != 'false' && needs.check_status.outputs.NEW_COMMITS == 'true') + steps: + - name: Cancel the run + env: + GH_TOKEN: ${{ github.token }} + run: | + echo "Repository is up to date and no monthly build is due — cancelling this run so it is not reported as a successful build." >> "$GITHUB_STEP_SUMMARY" + gh run cancel ${{ github.run_id }} --repo ${{ github.repository }} + # Keep the job alive until the cancellation lands, so the run ends as + # "cancelled" rather than completing successfully first. + sleep 300 + # Checks if Distribution certificate is present and valid, optionally nukes and # creates new certs if the repository variable ENABLE_NUKE_CERTS == 'true' # only run if a build is planned diff --git a/fastlane/testflight.md b/fastlane/testflight.md index b44f07df07..185aea17e0 100644 --- a/fastlane/testflight.md +++ b/fastlane/testflight.md @@ -12,7 +12,7 @@ These instructions allow you to build your app without having access to a Mac. > The browser build **defaults to** automatically updating and building a new version of Loop according to this schedule: > - automatically checks for updates weekly and if updates are found, it will build a new version of the app > - even when there are no updates, it builds on the second Sunday of the month -> - with each scheduled weekly run, a successful build log appears - if the time is very short, it did not need to build - only the long actions (>20 minutes) built a new app +> - if a scheduled run finds nothing new to build, the run is cancelled and shows as cancelled (grey) in the Actions list - a green check always means a new build was made and uploaded to TestFlight > > The [**Optional**](#optional) section provides instructions to modify the default behavior if desired.