From 2c1f06e0f2210cb19cc0cb1b327489ff1a2d456b Mon Sep 17 00:00:00 2001 From: xopenwrt Date: Mon, 29 Jun 2026 20:53:12 +0800 Subject: [PATCH] fix s3 upload conditions --- .github/workflows/X-x86_64_X.yml | 4 ++++ .github/workflows/X-x86_64_Y.yml | 4 ++++ .github/workflows/X-x86_64_Z.yml | 4 ++++ AI_CHANGELOG_S3_UPLOAD_CONDITIONS.md | 14 ++++++++++++++ 4 files changed, 26 insertions(+) create mode 100644 AI_CHANGELOG_S3_UPLOAD_CONDITIONS.md diff --git a/.github/workflows/X-x86_64_X.yml b/.github/workflows/X-x86_64_X.yml index 208317e..4f60a43 100644 --- a/.github/workflows/X-x86_64_X.yml +++ b/.github/workflows/X-x86_64_X.yml @@ -315,6 +315,7 @@ jobs: - name: 1 Upload SP_UEFI_VMDK to SharePoint uses: xopenwrt/s3-upload-github-action@master + if: env.SharePoint == 'true' && env.Result == 'true' && !cancelled() env: FILE: ./${{ steps.date.outputs.date }}/${{ env.SP_UEFI_IMG_GZ }} S3_ENDPOINT: 's3.openwrt.115115.xyz' @@ -324,6 +325,7 @@ jobs: - name: 2 Upload SP_UEFI_VMDK to SharePoint uses: xopenwrt/s3-upload-github-action@master + if: env.SharePoint == 'true' && env.Result == 'true' && !cancelled() env: FILE: ./${{ steps.date.outputs.date }}/${{ env.SP_UEFI_VMDK }} S3_ENDPOINT: 's3.openwrt.115115.xyz' @@ -333,6 +335,7 @@ jobs: - name: 5 Upload SP_LEGACY_IMG_GZ to SharePoint uses: xopenwrt/s3-upload-github-action@master + if: env.SharePoint == 'true' && env.Result == 'true' && !cancelled() env: FILE: ./${{ steps.date.outputs.date }}/${{ env.SP_LEGACY_IMG_GZ }} S3_ENDPOINT: 's3.openwrt.115115.xyz' @@ -342,6 +345,7 @@ jobs: - name: 6 Upload SP_LEGACY_VMDK to SharePoint uses: xopenwrt/s3-upload-github-action@master + if: env.SharePoint == 'true' && env.Result == 'true' && !cancelled() env: FILE: ./${{ steps.date.outputs.date }}/${{ env.SP_LEGACY_VMDK }} S3_ENDPOINT: 's3.openwrt.115115.xyz' diff --git a/.github/workflows/X-x86_64_Y.yml b/.github/workflows/X-x86_64_Y.yml index 3532b9a..d77d9e0 100644 --- a/.github/workflows/X-x86_64_Y.yml +++ b/.github/workflows/X-x86_64_Y.yml @@ -310,6 +310,7 @@ jobs: - name: 1 Upload SP_UEFI_VMDK to SharePoint uses: xopenwrt/s3-upload-github-action@master + if: env.SharePoint == 'true' && env.Result == 'true' && !cancelled() env: FILE: ./${{ steps.date.outputs.date }}/${{ env.SP_UEFI_IMG_GZ }} S3_ENDPOINT: 's3.openwrt.115115.xyz' @@ -319,6 +320,7 @@ jobs: - name: 2 Upload SP_UEFI_VMDK to SharePoint uses: xopenwrt/s3-upload-github-action@master + if: env.SharePoint == 'true' && env.Result == 'true' && !cancelled() env: FILE: ./${{ steps.date.outputs.date }}/${{ env.SP_UEFI_VMDK }} S3_ENDPOINT: 's3.openwrt.115115.xyz' @@ -328,6 +330,7 @@ jobs: - name: 5 Upload SP_LEGACY_IMG_GZ to SharePoint uses: xopenwrt/s3-upload-github-action@master + if: env.SharePoint == 'true' && env.Result == 'true' && !cancelled() env: FILE: ./${{ steps.date.outputs.date }}/${{ env.SP_LEGACY_IMG_GZ }} S3_ENDPOINT: 's3.openwrt.115115.xyz' @@ -337,6 +340,7 @@ jobs: - name: 6 Upload SP_LEGACY_VMDK to SharePoint uses: xopenwrt/s3-upload-github-action@master + if: env.SharePoint == 'true' && env.Result == 'true' && !cancelled() env: FILE: ./${{ steps.date.outputs.date }}/${{ env.SP_LEGACY_VMDK }} S3_ENDPOINT: 's3.openwrt.115115.xyz' diff --git a/.github/workflows/X-x86_64_Z.yml b/.github/workflows/X-x86_64_Z.yml index 6072522..cad03b5 100644 --- a/.github/workflows/X-x86_64_Z.yml +++ b/.github/workflows/X-x86_64_Z.yml @@ -309,6 +309,7 @@ jobs: - name: 1 Upload SP_UEFI_VMDK to SharePoint uses: xopenwrt/s3-upload-github-action@master + if: env.SharePoint == 'true' && env.Result == 'true' && !cancelled() env: FILE: ./${{ steps.date.outputs.date }}/${{ env.SP_UEFI_IMG_GZ }} S3_ENDPOINT: 's3.openwrt.115115.xyz' @@ -318,6 +319,7 @@ jobs: - name: 2 Upload SP_UEFI_VMDK to SharePoint uses: xopenwrt/s3-upload-github-action@master + if: env.SharePoint == 'true' && env.Result == 'true' && !cancelled() env: FILE: ./${{ steps.date.outputs.date }}/${{ env.SP_UEFI_VMDK }} S3_ENDPOINT: 's3.openwrt.115115.xyz' @@ -349,6 +351,7 @@ jobs: - name: 5 Upload SP_LEGACY_IMG_GZ to SharePoint uses: xopenwrt/s3-upload-github-action@master + if: env.SharePoint == 'true' && env.Result == 'true' && !cancelled() env: FILE: ./${{ steps.date.outputs.date }}/${{ env.SP_LEGACY_IMG_GZ }} S3_ENDPOINT: 's3.openwrt.115115.xyz' @@ -358,6 +361,7 @@ jobs: - name: 6 Upload SP_LEGACY_VMDK to SharePoint uses: xopenwrt/s3-upload-github-action@master + if: env.SharePoint == 'true' && env.Result == 'true' && !cancelled() env: FILE: ./${{ steps.date.outputs.date }}/${{ env.SP_LEGACY_VMDK }} S3_ENDPOINT: 's3.openwrt.115115.xyz' diff --git a/AI_CHANGELOG_S3_UPLOAD_CONDITIONS.md b/AI_CHANGELOG_S3_UPLOAD_CONDITIONS.md new file mode 100644 index 0000000..1b1a085 --- /dev/null +++ b/AI_CHANGELOG_S3_UPLOAD_CONDITIONS.md @@ -0,0 +1,14 @@ +# AI Modification Log: S3 Upload Conditions + +Date: 2026-06-29 + +## Change + +- Added `if: env.SharePoint == 'true' && env.Result == 'true' && !cancelled()` to enabled S3 upload steps in: + - `.github/workflows/X-x86_64_X.yml` + - `.github/workflows/X-x86_64_Y.yml` + - `.github/workflows/X-x86_64_Z.yml` + +## Reason + +The S3 upload steps used the SharePoint/S3 upload path but did not honor the `SharePoint` input or the build `Result`. The new condition prevents uploads when SharePoint upload is disabled, the build failed, or the workflow was cancelled.