Skip to content

Commit

Permalink
fix: actions upload artifactv4 name (#5258)
Browse files Browse the repository at this point in the history
* fix: actions/upload-artifact@v4 overwrite

* fix: artifact_name

* fix: download artifact_name
  • Loading branch information
zijiren233 authored Dec 4, 2024
1 parent fa14ff8 commit af98fc2
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci-patch-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/cloud-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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) }}
Expand Down Expand Up @@ -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: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/controllers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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: |
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/import-save-sealos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -10,9 +19,10 @@ jobs:
- name: Install sealos
uses: labring/[email protected]
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
4 changes: 3 additions & 1 deletion .github/workflows/objectstorage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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) }}
Expand Down Expand Up @@ -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: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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: |
Expand Down

0 comments on commit af98fc2

Please sign in to comment.