From af98fc2eb691457de43be13311b789ab90e83a39 Mon Sep 17 00:00:00 2001 From: zijiren <84728412+zijiren233@users.noreply.github.com> Date: Wed, 4 Dec 2024 12:13:33 +0800 Subject: [PATCH] fix: actions upload artifactv4 name (#5258) * fix: actions/upload-artifact@v4 overwrite * fix: artifact_name * fix: download artifact_name --- .github/workflows/ci-patch-image.yml | 2 ++ .github/workflows/cloud-release.yml | 6 ++++-- .github/workflows/cloud.yml | 4 +++- .github/workflows/controllers.yml | 4 +++- .github/workflows/frontend.yml | 4 +++- .github/workflows/import-save-sealos.yml | 14 ++++++++++++-- .github/workflows/objectstorage.yaml | 4 +++- .github/workflows/services.yml | 4 +++- 8 files changed, 33 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-patch-image.yml b/.github/workflows/ci-patch-image.yml index 8af5a4a97f8..87ec6e05f6a 100755 --- a/.github/workflows/ci-patch-image.yml +++ b/.github/workflows/ci-patch-image.yml @@ -134,6 +134,8 @@ jobs: SEALOS_COMMENT_BODY: "/imagebuild_apps sealos latest" save-sealos: uses: ./.github/workflows/import-save-sealos.yml + with: + artifact_name: sealos build-on-cluster-patch-image: if: ${{ (github.event_name == 'push') || (inputs.push_mage == true) }} needs: diff --git a/.github/workflows/cloud-release.yml b/.github/workflows/cloud-release.yml index 62abd42f4b0..c7ab2032aee 100644 --- a/.github/workflows/cloud-release.yml +++ b/.github/workflows/cloud-release.yml @@ -23,6 +23,8 @@ env: jobs: save-sealos: uses: ./.github/workflows/import-save-sealos.yml + with: + artifact_name: sealos-cloud-release release-controllers: if: ${{ github.event.inputs.build_offline_tar_only == false }} @@ -77,7 +79,7 @@ jobs: - name: Download sealos uses: actions/download-artifact@v4 with: - name: sealos + name: sealos-cloud-release path: /tmp/ - name: Verify sealos run: | @@ -116,7 +118,7 @@ jobs: - name: Download sealos uses: actions/download-artifact@v4 with: - name: sealos + name: sealos-cloud-release path: /tmp/ - name: Verify sealos run: | diff --git a/.github/workflows/cloud.yml b/.github/workflows/cloud.yml index 4f4e60d0c64..f244f05a69c 100644 --- a/.github/workflows/cloud.yml +++ b/.github/workflows/cloud.yml @@ -58,6 +58,8 @@ env: jobs: save-sealos: uses: ./.github/workflows/import-save-sealos.yml + with: + artifact_name: sealos-cloud build-cluster-image: if: ${{ (github.event_name == 'release') ||(github.event_name == 'push') || (inputs.push_image == true) }} @@ -87,7 +89,7 @@ jobs: - name: Download sealos uses: actions/download-artifact@v4 with: - name: sealos + name: sealos-cloud path: /tmp/ - name: Verify sealos run: | diff --git a/.github/workflows/controllers.yml b/.github/workflows/controllers.yml index dc63cfb5d00..69ee063c0e6 100644 --- a/.github/workflows/controllers.yml +++ b/.github/workflows/controllers.yml @@ -183,6 +183,8 @@ jobs: platforms: linux/amd64,linux/arm64 save-sealos: uses: ./.github/workflows/import-save-sealos.yml + with: + artifact_name: sealos-controllers build-cluster-image: if: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }} needs: @@ -233,7 +235,7 @@ jobs: - name: Download sealos uses: actions/download-artifact@v4 with: - name: sealos + name: sealos-controllers path: /tmp/ - name: Verify sealos run: | diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 26e1dc806a3..a807f20db17 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -145,6 +145,8 @@ jobs: cache-to: type=gha,mode=max save-sealos: uses: ./.github/workflows/import-save-sealos.yml + with: + artifact_name: sealos-frontend cluster-image-build: if: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }} needs: @@ -205,7 +207,7 @@ jobs: - name: Download sealos uses: actions/download-artifact@v4 with: - name: sealos + name: sealos-frontend path: /tmp/ - name: Verify sealos run: | diff --git a/.github/workflows/import-save-sealos.yml b/.github/workflows/import-save-sealos.yml index cef1e648204..2b91cacfb54 100755 --- a/.github/workflows/import-save-sealos.yml +++ b/.github/workflows/import-save-sealos.yml @@ -2,6 +2,15 @@ name: Import Save sealos from version on: workflow_call: + inputs: + sealosVersion: + type: string + description: The version of sealos to save + default: 4.1.7 + artifact_name: + type: string + description: The name of the artifact to save + default: sealos jobs: save-sealos: @@ -10,9 +19,10 @@ jobs: - name: Install sealos uses: labring/sealos-action@v0.0.7 with: - sealosVersion: "4.1.7" + sealosVersion: ${{ inputs.sealosVersion }} - name: Save Binaries uses: actions/upload-artifact@v4 with: - name: sealos + name: ${{ inputs.artifact_name }} path: /usr/bin/sealos + overwrite: true diff --git a/.github/workflows/objectstorage.yaml b/.github/workflows/objectstorage.yaml index 03b94faa913..a92ac99ec52 100644 --- a/.github/workflows/objectstorage.yaml +++ b/.github/workflows/objectstorage.yaml @@ -58,6 +58,8 @@ env: jobs: save-sealos: uses: ./.github/workflows/import-save-sealos.yml + with: + artifact_name: sealos-objectstorage build-cluster-image: if: ${{ (github.event_name == 'release') ||(github.event_name == 'push') || (inputs.push_image == true) }} @@ -87,7 +89,7 @@ jobs: - name: Download sealos uses: actions/download-artifact@v4 with: - name: sealos + name: sealos-objectstorage path: /tmp/ - name: Verify sealos run: | diff --git a/.github/workflows/services.yml b/.github/workflows/services.yml index 8379ca47657..107e49f9266 100644 --- a/.github/workflows/services.yml +++ b/.github/workflows/services.yml @@ -173,6 +173,8 @@ jobs: save-sealos: uses: ./.github/workflows/import-save-sealos.yml + with: + artifact_name: sealos-services build-cluster-image: if: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }} needs: @@ -210,7 +212,7 @@ jobs: - name: Download sealos uses: actions/download-artifact@v4 with: - name: sealos + name: sealos-services path: /tmp/ - name: Verify sealos run: |