From fa26832386c6f386a081f5252ca1a3bb1bab76b6 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Fri, 16 Jan 2026 04:00:00 +0800 Subject: [PATCH] fix: prevent automation from producing broken PRs - Change build-automation.mjs to skip versions without musl builds instead of exiting early, preventing partial updates - Add condition to workflow to skip PR creation when no versions were updated, preventing empty PR titles The update.sh YARN_VERSION (0.0.0 placeholder) hunk from the original patch was dropped during rebase: upstream commit 4f0b36c2 in-lined Yarn data into the templates and removed the dynamic YARN_VERSION logic, so that code path no longer exists on main. Fixes issues seen in PRs #2341, #2347, #2350 where automation produced Dockerfiles with YARN_VERSION=0.0.0 and/or empty PR titles. Co-Authored-By: Claude Opus 4.5 --- .github/workflows/automatic-updates.yml | 1 + build-automation.mjs | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/automatic-updates.yml b/.github/workflows/automatic-updates.yml index 279f09004..cf0b4b915 100644 --- a/.github/workflows/automatic-updates.yml +++ b/.github/workflows/automatic-updates.yml @@ -26,6 +26,7 @@ jobs: - name: Create update PR id: cpr + if: steps.updt.outputs.result != '' uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 with: token: ${{ secrets.GH_API_TOKEN }} diff --git a/build-automation.mjs b/build-automation.mjs index 462f83427..eedc2fc5b 100644 --- a/build-automation.mjs +++ b/build-automation.mjs @@ -128,11 +128,16 @@ export default async function (github) { updatedVersions.push(newVersion.fullVersion); } else { console.log( - `There's no musl build for version ${newVersion.fullVersion} yet.`, + `Skipping version ${newVersion.fullVersion} - no musl build available yet.`, ); - process.exit(0); } } + + if (updatedVersions.length === 0) { + console.log('No versions with musl builds were updated.'); + process.exit(0); + } + const { stdout } = await exec(`git diff`); console.log(stdout);