From 66269d4895b1bc865b35cfac20c25a552b6f2a6b Mon Sep 17 00:00:00 2001 From: xopenwrt Date: Mon, 29 Jun 2026 21:47:40 +0800 Subject: [PATCH] fix build update condition --- .github/workflows/X-x86_64_X.yml | 1 + .github/workflows/X-x86_64_Y.yml | 1 + .github/workflows/X-x86_64_Z.yml | 1 + AI_CHANGELOG_BUILD_UPDATE_CONDITION.md | 12 ++++++++++++ 4 files changed, 15 insertions(+) create mode 100644 AI_CHANGELOG_BUILD_UPDATE_CONDITION.md diff --git a/.github/workflows/X-x86_64_X.yml b/.github/workflows/X-x86_64_X.yml index 6fafed8..7fb6a59 100644 --- a/.github/workflows/X-x86_64_X.yml +++ b/.github/workflows/X-x86_64_X.yml @@ -237,6 +237,7 @@ jobs: - name: Check Build Update + if: env.Result == 'true' && env.Release == 'true' && env.UPLOAD_RELEASES == 'true' && !cancelled() run: | export NOW_DATA_VERSION=${{env.NOW_DATA_VERSION}} export GITHUB_WORKSPACE=$GITHUB_WORKSPACE diff --git a/.github/workflows/X-x86_64_Y.yml b/.github/workflows/X-x86_64_Y.yml index 4026506..fc463fc 100644 --- a/.github/workflows/X-x86_64_Y.yml +++ b/.github/workflows/X-x86_64_Y.yml @@ -233,6 +233,7 @@ jobs: - name: Check Build Update + if: env.Result == 'true' && env.Release == 'true' && env.UPLOAD_RELEASES == 'true' && !cancelled() run: | export NOW_DATA_VERSION=${{env.NOW_DATA_VERSION}} export GITHUB_WORKSPACE=$GITHUB_WORKSPACE diff --git a/.github/workflows/X-x86_64_Z.yml b/.github/workflows/X-x86_64_Z.yml index 530f9c2..509f8aa 100644 --- a/.github/workflows/X-x86_64_Z.yml +++ b/.github/workflows/X-x86_64_Z.yml @@ -231,6 +231,7 @@ jobs: [ "${build_status}" == 0 ] && echo "Result=true" >> $GITHUB_ENV || echo "Result=false" >> $GITHUB_ENV - name: Check Build Update + if: env.Result == 'true' && env.Release == 'true' && env.UPLOAD_RELEASES == 'true' && !cancelled() run: | export NOW_DATA_VERSION=${{env.NOW_DATA_VERSION}} export GITHUB_WORKSPACE=$GITHUB_WORKSPACE diff --git a/AI_CHANGELOG_BUILD_UPDATE_CONDITION.md b/AI_CHANGELOG_BUILD_UPDATE_CONDITION.md new file mode 100644 index 0000000..483bb0f --- /dev/null +++ b/AI_CHANGELOG_BUILD_UPDATE_CONDITION.md @@ -0,0 +1,12 @@ +# AI Modification Log: Build Update Condition + +Date: 2026-06-29 + +## Change + +- Added an `if` condition to the `Check Build Update` step in X/Y/Z workflows. +- The step now runs only when the build succeeded, release upload is enabled, and the workflow was not cancelled. + +## Reason + +The update checker depends on the build log and release metadata. Running it after a failed build or when release upload is disabled can cause unnecessary failures or remote API work.