diff --git a/.github/workflows/automatic-updates.yml b/.github/workflows/automatic-updates.yml index 85334f63e..6ca77a946 100644 --- a/.github/workflows/automatic-updates.yml +++ b/.github/workflows/automatic-updates.yml @@ -25,6 +25,7 @@ jobs: - name: Create update PR id: cpr + if: steps.updt.outputs.result != '' uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0 with: token: ${{ secrets.GH_API_TOKEN }} diff --git a/build-automation.mjs b/build-automation.mjs index ba296d1ed..3d1eb5592 100644 --- a/build-automation.mjs +++ b/build-automation.mjs @@ -93,10 +93,15 @@ export default async function(github) { console.log(stdout); updatedVersions.push(newVersion.fullVersion); } else { - console.log(`There's no musl build for version ${newVersion.fullVersion} yet.`); - process.exit(0); + console.log(`Skipping version ${newVersion.fullVersion} - no musl build available yet.`); } } + + 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); diff --git a/update.sh b/update.sh index c30b6b308..c0d715353 100755 --- a/update.sh +++ b/update.sh @@ -170,6 +170,12 @@ function update_node_version() { else if [ "${SKIP}" != true ]; then sed -Ei -e 's/^(ENV YARN_VERSION)=.*/\1='"${yarnVersion}"'/' "${dockerfile}-tmp" + else + # Preserve existing YARN_VERSION from current Dockerfile when SKIP=true + existingYarnVersion=$(sed -n 's/^ENV YARN_VERSION=//p' "${dockerfile}") + if [ -n "${existingYarnVersion}" ]; then + sed -Ei -e 's/^(ENV YARN_VERSION)=.*/\1='"${existingYarnVersion}"'/' "${dockerfile}-tmp" + fi fi echo "${dockerfile} updated!" fi