From a3b9d75073a60541e966ea212a6ab01c590a224a Mon Sep 17 00:00:00 2001 From: JarbasAi Date: Sat, 26 Sep 2026 14:48:34 +0000 Subject: [PATCH] fix(ci): publish a release only from a dispatch on dev, in the other three builders The port of #178's guard to the three builders it does not cover: build_lite_lang_images.yml, build_raspOVOS_full.yml and build_raspOVOS_lite.yml. Five workflows in this repository create a public release, and a guard on two of them leaves the other three publishing. Re-cut to match #178 after decision raspovos-dev-push-publishes-release, answered dispatch-only on 2026-09-28. The first cut copied #178 verbatim, `if: github.ref == 'refs/heads/dev'`, which is TRUE on a push to dev and so left the merge-publishes-a-release path open. The guard now tests the event as well as the branch: if: github.ref == 'refs/heads/dev' && github.event_name == 'workflow_dispatch' The two lang-image jobs both carry it. In the two base builders one guard is enough and that is deliberate: `upload-image` is gated on `needs.check-release-or-create.outputs.release_id`, so when the release job is skipped the output is empty and the upload skips with it. Co-Authored-By: Claude Opus 5 --- .github/workflows/build_lite_lang_images.yml | 18 ++++++++++++++++++ .github/workflows/build_raspOVOS_full.yml | 9 +++++++++ .github/workflows/build_raspOVOS_lite.yml | 9 +++++++++ 3 files changed, 36 insertions(+) diff --git a/.github/workflows/build_lite_lang_images.yml b/.github/workflows/build_lite_lang_images.yml index 5f5d11b6..f6e13ac6 100644 --- a/.github/workflows/build_lite_lang_images.yml +++ b/.github/workflows/build_lite_lang_images.yml @@ -102,6 +102,15 @@ jobs: create-release: runs-on: ubuntu-24.04 + # A release is cut by hand, never by a merge. The workflow also runs on + # a push to dev, and `github.ref` is refs/heads/dev on that push, so the + # branch test alone made every green dev push publish a public release + # dated that day (decision raspovos-dev-push-publishes-release, answered + # dispatch-only 2026-09-28). The event test is what holds: + # push to dev -> builds the images, publishes nothing + # dispatch on a PR branch -> builds the images, publishes nothing + # dispatch on dev -> publishes, and only a person starts that + if: github.ref == 'refs/heads/dev' && github.event_name == 'workflow_dispatch' needs: [get-date-release-name, build-all-images] outputs: release_id: ${{ steps.get-release-id.outputs.release_id }} @@ -124,6 +133,15 @@ jobs: upload-images: runs-on: ubuntu-24.04 + # A release is cut by hand, never by a merge. The workflow also runs on + # a push to dev, and `github.ref` is refs/heads/dev on that push, so the + # branch test alone made every green dev push publish a public release + # dated that day (decision raspovos-dev-push-publishes-release, answered + # dispatch-only 2026-09-28). The event test is what holds: + # push to dev -> builds the images, publishes nothing + # dispatch on a PR branch -> builds the images, publishes nothing + # dispatch on dev -> publishes, and only a person starts that + if: github.ref == 'refs/heads/dev' && github.event_name == 'workflow_dispatch' needs: [create-release, build-all-images] strategy: fail-fast: false diff --git a/.github/workflows/build_raspOVOS_full.yml b/.github/workflows/build_raspOVOS_full.yml index a98c0505..96372a0e 100644 --- a/.github/workflows/build_raspOVOS_full.yml +++ b/.github/workflows/build_raspOVOS_full.yml @@ -131,6 +131,15 @@ jobs: # Stage 3: Check if Release Exists and Create if Needed check-release-or-create: runs-on: ubuntu-24.04 + # A release is cut by hand, never by a merge. The workflow also runs on + # a push to dev, and `github.ref` is refs/heads/dev on that push, so the + # branch test alone made every green dev push publish a public release + # dated that day (decision raspovos-dev-push-publishes-release, answered + # dispatch-only 2026-09-28). The event test is what holds: + # push to dev -> builds the images, publishes nothing + # dispatch on a PR branch -> builds the images, publishes nothing + # dispatch on dev -> publishes, and only a person starts that + if: github.ref == 'refs/heads/dev' && github.event_name == 'workflow_dispatch' needs: [ get-date-release-name, modify-rpi-image, smoke-test ] outputs: release_id: ${{ steps.get-release-id.outputs.release_id }} diff --git a/.github/workflows/build_raspOVOS_lite.yml b/.github/workflows/build_raspOVOS_lite.yml index dc4cee99..4f8bc13b 100644 --- a/.github/workflows/build_raspOVOS_lite.yml +++ b/.github/workflows/build_raspOVOS_lite.yml @@ -109,6 +109,15 @@ jobs: # Stage 3: Check if Release Exists and Create if Needed check-release-or-create: runs-on: ubuntu-24.04 + # A release is cut by hand, never by a merge. The workflow also runs on + # a push to dev, and `github.ref` is refs/heads/dev on that push, so the + # branch test alone made every green dev push publish a public release + # dated that day (decision raspovos-dev-push-publishes-release, answered + # dispatch-only 2026-09-28). The event test is what holds: + # push to dev -> builds the images, publishes nothing + # dispatch on a PR branch -> builds the images, publishes nothing + # dispatch on dev -> publishes, and only a person starts that + if: github.ref == 'refs/heads/dev' && github.event_name == 'workflow_dispatch' needs: [ get-date-release-name, modify-rpi-image, smoke-test ] outputs: release_id: ${{ steps.get-release-id.outputs.release_id }}