From 52e0485ee3726bef4e54321bba0da8ea2be39b5d Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sat, 18 Jan 2025 12:21:19 +0800 Subject: [PATCH 01/18] feat: arm64 runner --- .github/workflows/frontend.yml | 242 ++++++++++++++++---------------- .github/workflows/frontends.yml | 74 ++++++++++ 2 files changed, 198 insertions(+), 118 deletions(-) create mode 100644 .github/workflows/frontends.yml diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index a807f20db17..2b9dcb8065f 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -1,120 +1,64 @@ name: Build Frontend Image on: - create: - tags: workflow_call: inputs: - push_image: - description: 'Push image' - required: false - type: boolean - default: false - push_image_tag: - description: 'Push image tag' - default: 'latest' - required: false + module: + description: "Module" + required: true type: string - workflow_dispatch: - inputs: push_image: - description: 'Push image' + description: "Push image" required: false type: boolean default: false push_image_tag: - description: 'Push image tag' - default: 'latest' + description: "Push image tag" + default: "latest" required: false type: string - push: - branches: ['main'] - paths: - - 'frontend/desktop/**' - - 'frontend/providers/**' - - '.github/workflows/frontend.yml' - - '!**/*.md' - - '!**/*.yaml' - pull_request: - branches: ['*'] - paths: - - 'frontend/desktop/**' - - 'frontend/providers/**' - - '.github/workflows/frontend.yml' - - '!**/*.md' - - '!**/*.yaml' env: # Common versions - GO_VERSION: '1.20' - DEFAULT_OWNER: 'labring' + push: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }} + GO_VERSION: "1.20" + DEFAULT_OWNER: "labring" jobs: image-build: - runs-on: ubuntu-latest strategy: matrix: - module: - [ - providers/license, - providers/cronjob, - providers/template, - providers/adminer, - providers/applaunchpad, - providers/terminal, - providers/dbprovider, - providers/costcenter, - providers/objectstorage, - providers/kubepanel, - providers/workorder, - providers/devbox, - desktop, - ] + include: + - arch: amd64 + - arch: arm64 + runs-on: ubuntu-24.04-arm + runs-on: ${{ matrix.runs-on || 'ubuntu-24.04' }} steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Expose git commit data - uses: rlespinasse/git-commit-data-action@v1 - - name: Check if tag - id: check_tag - run: | - if [[ "${{ github.ref }}" == refs/tags/* ]]; then - echo "isTag=true" >> "$GITHUB_OUTPUT" - else - echo "isTag=false" >> "$GITHUB_OUTPUT" - fi - - name: Prepare - id: prepare - run: | - bash ./scripts/resolve-tag-image.sh "${{ inputs.push_image }}" "${{ steps.check_tag.outputs.isTag }}" "${{ inputs.push_image_tag }}" - name: Extract module name id: module_name run: | - MODULE_NAME=$(basename ${{ matrix.module }}) + MODULE_NAME=$(basename ${{ inputs.module }}) echo "MODULE_NAME=${MODULE_NAME}" >> $GITHUB_ENV + echo "GHCR_REPO=ghcr.io/${{ github.repository_owner }}/sealos-${MODULE_NAME}-frontend" >> $GITHUB_ENV - name: Docker meta id: meta uses: docker/metadata-action@v4 with: images: | - ghcr.io/${{ github.repository_owner }}/sealos-${{ env.MODULE_NAME }}-frontend - tags: | - type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} - type=raw,value=${{ steps.prepare.outputs.tag_name }},enable=true - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + ${{ env.GHCR_REPO }} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to Github Container Hub - if: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }} - uses: docker/login-action@v2 + if: ${{ env.push }} + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -128,21 +72,101 @@ jobs: uses: reproducible-containers/buildkit-cache-dance@v2.1.2 with: cache-source: pnpm-store - - name: Build And Push + - name: Build + id: build uses: docker/build-push-action@v4 with: context: ./frontend file: ./frontend/Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: linux/${{ matrix.arch }} build-args: | name=${{ env.MODULE_NAME }} - path=${{ matrix.module }} - # Push if it's a push event or if push_image is true - push: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }} - tags: ${{ steps.meta.outputs.tags }} + path=${{ inputs.module }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max + outputs: type=image,"name=${{ env.GHCR_REPO }}",name-canonical=true,push-by-digest=${{ env.push }},push=${{ env.push }} + - name: Export digest + run: | + mkdir -p ${{ runner.temp }}/digests + digest="${{ steps.build.outputs.digest }}" + touch "${{ runner.temp }}/digests/${digest#sha256:}" + + - name: Upload digest + uses: actions/upload-artifact@v4 + with: + name: digests-${{ matrix.arch }} + path: ${{ runner.temp }}/digests/* + if-no-files-found: error + retention-days: 1 + + image-release: + name: Push Docker Images + needs: image-build + runs-on: ubuntu-24.04 + if: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }} + steps: + - name: Login to Github Container Hub + if: ${{ env.push }} + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GH_PAT }} + + - name: Download digests + uses: actions/download-artifact@v4 + with: + path: ${{ runner.temp }}/digests + pattern: digests-* + merge-multiple: true + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Expose git commit data + uses: rlespinasse/git-commit-data-action@v1 + + - name: Check if tag + id: check_tag + run: | + if [[ "${{ github.ref }}" == refs/tags/* ]]; then + echo "isTag=true" >> "$GITHUB_OUTPUT" + else + echo "isTag=false" >> "$GITHUB_OUTPUT" + fi + + - name: Prepare + id: prepare + run: | + bash ./scripts/resolve-tag-image.sh "${{ inputs.push_image }}" "${{ steps.check_tag.outputs.isTag }}" "${{ inputs.push_image_tag }}" + + - name: Extract module name + id: module_name + run: | + MODULE_NAME=$(basename ${{ inputs.module }}) + echo "MODULE_NAME=${MODULE_NAME}" >> $GITHUB_ENV + echo "GHCR_REPO=ghcr.io/${{ github.repository_owner }}/sealos-${MODULE_NAME}-frontend" >> $GITHUB_ENV + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ${{ env.GHCR_REPO }} + tags: | + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + type=raw,value=${{ steps.prepare.outputs.tag_name }},enable=true + + - name: Create manifest list and push + working-directory: ${{ runner.temp }}/digests + run: | + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(printf '${{ env.GHCR_REPO }}@sha256:%s ' *) + + - name: Inspect image + run: | + docker buildx imagetools inspect ${{ env.GHCR_REPO }}:${{ steps.meta.outputs.version }} + save-sealos: uses: ./.github/workflows/import-save-sealos.yml with: @@ -153,24 +177,6 @@ jobs: - image-build - save-sealos runs-on: ubuntu-latest - strategy: - matrix: - module: - [ - providers/license, - providers/cronjob, - providers/template, - providers/adminer, - providers/applaunchpad, - providers/terminal, - providers/dbprovider, - providers/costcenter, - providers/objectstorage, - providers/kubepanel, - providers/workorder, - providers/devbox, - desktop, - ] steps: - name: Checkout uses: actions/checkout@v3 @@ -179,7 +185,7 @@ jobs: - name: Extract module name id: module_name run: | - MODULE_NAME=$(basename ${{ matrix.module }}) + MODULE_NAME=$(basename ${{ inputs.module }}) echo "MODULE_NAME=${MODULE_NAME}" >> $GITHUB_ENV - name: Expose git commit data @@ -220,7 +226,7 @@ jobs: sudo sealos login -u ${{ github.repository_owner }} -p ${{ secrets.GH_PAT }} --debug ghcr.io - name: Build ${{ env.MODULE_NAME }}-frontend cluster image - working-directory: frontend/${{ matrix.module }}/deploy + working-directory: frontend/${{ inputs.module }}/deploy run: | sudo sed -i "s;${{ steps.prepare.outputs.old_docker_image }};${{ steps.prepare.outputs.new_docker_image }};" manifests/* sudo sealos build -t ${{ steps.prepare.outputs.cluster_image }}-amd64 --platform linux/amd64 -f Kubefile @@ -244,14 +250,14 @@ jobs: with: version: v0.0.8-rc1 env: - GH_TOKEN: '${{ secrets.GH_PAT }}' - SEALOS_TYPE: 'issue_renew' - SEALOS_ISSUE_TITLE: '[DaylyReport] Auto build for sealos' - SEALOS_ISSUE_BODYFILE: 'scripts/ISSUE_RENEW.md' - SEALOS_ISSUE_LABEL: 'dayly-report' - SEALOS_ISSUE_TYPE: 'day' - SEALOS_ISSUE_REPO: 'labring-actions/cluster-image' - SEALOS_COMMENT_BODY: '/imagesync ${{ steps.prepare.outputs.cluster_image }}' + GH_TOKEN: "${{ secrets.GH_PAT }}" + SEALOS_TYPE: "issue_renew" + SEALOS_ISSUE_TITLE: "[DaylyReport] Auto build for sealos" + SEALOS_ISSUE_BODYFILE: "scripts/ISSUE_RENEW.md" + SEALOS_ISSUE_LABEL: "dayly-report" + SEALOS_ISSUE_TYPE: "day" + SEALOS_ISSUE_REPO: "labring-actions/cluster-image" + SEALOS_COMMENT_BODY: "/imagesync ${{ steps.prepare.outputs.cluster_image }}" - name: Renew issue and Sync Images for ${{ steps.prepare.outputs.latest_cluster_image }} uses: labring/gh-rebot@v0.0.6 @@ -259,11 +265,11 @@ jobs: with: version: v0.0.8-rc1 env: - GH_TOKEN: '${{ secrets.GH_PAT }}' - SEALOS_TYPE: 'issue_renew' - SEALOS_ISSUE_TITLE: '[DaylyReport] Auto build for sealos' - SEALOS_ISSUE_BODYFILE: 'scripts/ISSUE_RENEW.md' - SEALOS_ISSUE_LABEL: 'dayly-report' - SEALOS_ISSUE_TYPE: 'day' - SEALOS_ISSUE_REPO: 'labring-actions/cluster-image' - SEALOS_COMMENT_BODY: '/imagesync ${{ steps.prepare.outputs.latest_cluster_image }}' + GH_TOKEN: "${{ secrets.GH_PAT }}" + SEALOS_TYPE: "issue_renew" + SEALOS_ISSUE_TITLE: "[DaylyReport] Auto build for sealos" + SEALOS_ISSUE_BODYFILE: "scripts/ISSUE_RENEW.md" + SEALOS_ISSUE_LABEL: "dayly-report" + SEALOS_ISSUE_TYPE: "day" + SEALOS_ISSUE_REPO: "labring-actions/cluster-image" + SEALOS_COMMENT_BODY: "/imagesync ${{ steps.prepare.outputs.latest_cluster_image }}" diff --git a/.github/workflows/frontends.yml b/.github/workflows/frontends.yml new file mode 100644 index 00000000000..a4cedd82c7b --- /dev/null +++ b/.github/workflows/frontends.yml @@ -0,0 +1,74 @@ +name: Build Frontends Image + +on: + workflow_call: + inputs: + push_image: + description: "Push image" + required: false + type: boolean + default: false + push_image_tag: + description: "Push image tag" + default: "latest" + required: false + type: string + workflow_dispatch: + inputs: + push_image: + description: "Push image" + required: false + type: boolean + default: false + push_image_tag: + description: "Push image tag" + default: "latest" + required: false + type: string + push: + branches: ["main"] + paths: + - "frontend/desktop/**" + - "frontend/providers/**" + - ".github/workflows/frontend.yml" + - "!**/*.md" + - "!**/*.yaml" + pull_request: + branches: ["*"] + paths: + - "frontend/desktop/**" + - "frontend/providers/**" + - ".github/workflows/frontend.yml" + - "!**/*.md" + - "!**/*.yaml" + +env: + # Common versions + GO_VERSION: "1.20" + DEFAULT_OWNER: "labring" + +jobs: + image-build: + uses: ./.github/workflows/frontend.yml + strategy: + matrix: + module: + [ + providers/license, + providers/cronjob, + providers/template, + providers/adminer, + providers/applaunchpad, + providers/terminal, + providers/dbprovider, + providers/costcenter, + providers/objectstorage, + providers/kubepanel, + providers/workorder, + providers/devbox, + desktop, + ] + with: + module: ${{ matrix.module }} + push_image: ${{ inputs.push_image }} + push_image_tag: ${{ inputs.push_image_tag }} From d8040f302ec528ab1a8e8be23226c3c568dc5a15 Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sat, 18 Jan 2025 12:31:02 +0800 Subject: [PATCH 02/18] fix: push image --- .github/workflows/frontend.yml | 11 +++++------ .github/workflows/frontends.yml | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 2b9dcb8065f..6b43e7d4778 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -20,7 +20,6 @@ on: env: # Common versions - push: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }} GO_VERSION: "1.20" DEFAULT_OWNER: "labring" @@ -57,8 +56,8 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Login to Github Container Hub - if: ${{ env.push }} - uses: docker/login-action@v3 + if: ${{ inputs.push_image }} + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -85,7 +84,7 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max - outputs: type=image,"name=${{ env.GHCR_REPO }}",name-canonical=true,push-by-digest=${{ env.push }},push=${{ env.push }} + outputs: type=image,"name=${{ env.GHCR_REPO }}",name-canonical=true,push-by-digest=${{ inputs.push_image }},push=${{ inputs.push_image }} - name: Export digest run: | mkdir -p ${{ runner.temp }}/digests @@ -107,8 +106,8 @@ jobs: if: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }} steps: - name: Login to Github Container Hub - if: ${{ env.push }} - uses: docker/login-action@v3 + if: ${{ inputs.push_image }} + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/frontends.yml b/.github/workflows/frontends.yml index a4cedd82c7b..0292ce33dcd 100644 --- a/.github/workflows/frontends.yml +++ b/.github/workflows/frontends.yml @@ -70,5 +70,5 @@ jobs: ] with: module: ${{ matrix.module }} - push_image: ${{ inputs.push_image }} + push_image: ${{ (github.event_name == 'push') || (github.event_name == 'create') || (inputs.push_image == true) }} push_image_tag: ${{ inputs.push_image_tag }} From 503cdb30d3b20765e4f747cc82df001dda826bb9 Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sat, 18 Jan 2025 12:38:44 +0800 Subject: [PATCH 03/18] fix: save sealos --- .github/workflows/frontend.yml | 7 +++++++ .github/workflows/frontends.yml | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 6b43e7d4778..e50de1ea08f 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -3,6 +3,11 @@ name: Build Frontend Image on: workflow_call: inputs: + save-sealos: + description: "Save sealos" + required: false + type: boolean + default: true module: description: "Module" required: true @@ -168,8 +173,10 @@ jobs: save-sealos: uses: ./.github/workflows/import-save-sealos.yml + if: ${{ inputs.save-sealos }} with: artifact_name: sealos-frontend + cluster-image-build: if: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }} needs: diff --git a/.github/workflows/frontends.yml b/.github/workflows/frontends.yml index 0292ce33dcd..7cecb1a171d 100644 --- a/.github/workflows/frontends.yml +++ b/.github/workflows/frontends.yml @@ -48,6 +48,11 @@ env: DEFAULT_OWNER: "labring" jobs: + save-sealos: + uses: ./.github/workflows/import-save-sealos.yml + with: + artifact_name: sealos-frontend + image-build: uses: ./.github/workflows/frontend.yml strategy: @@ -69,6 +74,7 @@ jobs: desktop, ] with: + save-sealos: false module: ${{ matrix.module }} push_image: ${{ (github.event_name == 'push') || (github.event_name == 'create') || (inputs.push_image == true) }} push_image_tag: ${{ inputs.push_image_tag }} From 5cc442dc03fdf40c92d3b238bb96e22c43cde158 Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sat, 18 Jan 2025 12:40:31 +0800 Subject: [PATCH 04/18] fix: save sealos needs --- .github/workflows/frontends.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/frontends.yml b/.github/workflows/frontends.yml index 7cecb1a171d..462fdccef6d 100644 --- a/.github/workflows/frontends.yml +++ b/.github/workflows/frontends.yml @@ -55,6 +55,7 @@ jobs: image-build: uses: ./.github/workflows/frontend.yml + needs: save-sealos strategy: matrix: module: From 7d30c3b1b8e71c599551e2727730d1046d63bb7a Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sat, 18 Jan 2025 12:57:51 +0800 Subject: [PATCH 05/18] fix: digests name --- .github/workflows/frontend.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index e50de1ea08f..544e483f6ae 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -62,7 +62,7 @@ jobs: - name: Login to Github Container Hub if: ${{ inputs.push_image }} - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -99,7 +99,7 @@ jobs: - name: Upload digest uses: actions/upload-artifact@v4 with: - name: digests-${{ matrix.arch }} + name: digests-${{ env.MODULE_NAME }}-${{ matrix.arch }} path: ${{ runner.temp }}/digests/* if-no-files-found: error retention-days: 1 @@ -108,21 +108,27 @@ jobs: name: Push Docker Images needs: image-build runs-on: ubuntu-24.04 - if: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }} + if: ${{ inputs.push_image }} steps: - name: Login to Github Container Hub - if: ${{ inputs.push_image }} - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GH_PAT }} + - name: Extract module name + id: module_name + run: | + MODULE_NAME=$(basename ${{ inputs.module }}) + echo "MODULE_NAME=${MODULE_NAME}" >> $GITHUB_ENV + echo "GHCR_REPO=ghcr.io/${{ github.repository_owner }}/sealos-${MODULE_NAME}-frontend" >> $GITHUB_ENV + - name: Download digests uses: actions/download-artifact@v4 with: path: ${{ runner.temp }}/digests - pattern: digests-* + pattern: digests-${{ env.MODULE_NAME }}-* merge-multiple: true - name: Set up Docker Buildx @@ -144,13 +150,6 @@ jobs: run: | bash ./scripts/resolve-tag-image.sh "${{ inputs.push_image }}" "${{ steps.check_tag.outputs.isTag }}" "${{ inputs.push_image_tag }}" - - name: Extract module name - id: module_name - run: | - MODULE_NAME=$(basename ${{ inputs.module }}) - echo "MODULE_NAME=${MODULE_NAME}" >> $GITHUB_ENV - echo "GHCR_REPO=ghcr.io/${{ github.repository_owner }}/sealos-${MODULE_NAME}-frontend" >> $GITHUB_ENV - - name: Docker meta id: meta uses: docker/metadata-action@v4 @@ -178,7 +177,7 @@ jobs: artifact_name: sealos-frontend cluster-image-build: - if: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }} + if: ${{ inputs.push_image }} needs: - image-build - save-sealos From f22b9f05a6f9933017c2d452d439832f5098f0aa Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sat, 18 Jan 2025 13:10:20 +0800 Subject: [PATCH 06/18] fix: secret innherit --- .github/workflows/frontends.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/frontends.yml b/.github/workflows/frontends.yml index 462fdccef6d..ca4d72385c5 100644 --- a/.github/workflows/frontends.yml +++ b/.github/workflows/frontends.yml @@ -56,6 +56,7 @@ jobs: image-build: uses: ./.github/workflows/frontend.yml needs: save-sealos + secrets: inherit strategy: matrix: module: From 413b9415c83fbd9290509c8330b448754fc46ef1 Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sat, 18 Jan 2025 13:18:45 +0800 Subject: [PATCH 07/18] fix: checkout --- .github/workflows/frontend.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 544e483f6ae..d18927a5abd 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -67,15 +67,7 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GH_PAT }} - - name: Cache pnpm-store - uses: actions/cache@v3 - with: - path: pnpm-store - key: pnpm-store-${{ hashFiles('Dockerfile') }} - - name: inject pnpm-store into docker - uses: reproducible-containers/buildkit-cache-dance@v2.1.2 - with: - cache-source: pnpm-store + - name: Build id: build uses: docker/build-push-action@v4 @@ -87,8 +79,6 @@ jobs: name=${{ env.MODULE_NAME }} path=${{ inputs.module }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max outputs: type=image,"name=${{ env.GHCR_REPO }}",name-canonical=true,push-by-digest=${{ inputs.push_image }},push=${{ inputs.push_image }} - name: Export digest run: | @@ -110,6 +100,11 @@ jobs: runs-on: ubuntu-24.04 if: ${{ inputs.push_image }} steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Login to Github Container Hub uses: docker/login-action@v3 with: @@ -148,7 +143,7 @@ jobs: - name: Prepare id: prepare run: | - bash ./scripts/resolve-tag-image.sh "${{ inputs.push_image }}" "${{ steps.check_tag.outputs.isTag }}" "${{ inputs.push_image_tag }}" + bash ./scripts/resolve-tag-image.sh "${{ inputs.push_image }}" "${{ steps.check_tag.outputs.isTag }}" "${{ inputs.push_image_tag }}" - name: Docker meta id: meta From a30c3f972ec4698a1bbf4f515210dde13c7766ce Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sat, 18 Jan 2025 13:27:53 +0800 Subject: [PATCH 08/18] fix: fail-fast --- .github/workflows/frontend.yml | 18 +++++++++++++++++- .github/workflows/frontends.yml | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index d18927a5abd..518a225e0ce 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -22,6 +22,22 @@ on: default: "latest" required: false type: string + workflow_dispatch: + inputs: + module: + description: "Module" + required: true + type: string + push_image: + description: "Push image" + required: false + type: boolean + default: false + push_image_tag: + description: "Push image tag" + default: "latest" + required: false + type: string env: # Common versions @@ -167,7 +183,7 @@ jobs: save-sealos: uses: ./.github/workflows/import-save-sealos.yml - if: ${{ inputs.save-sealos }} + if: ${{ inputs.save-sealos != '' && inputs.save-sealos || true }} with: artifact_name: sealos-frontend diff --git a/.github/workflows/frontends.yml b/.github/workflows/frontends.yml index ca4d72385c5..8c71d6beb15 100644 --- a/.github/workflows/frontends.yml +++ b/.github/workflows/frontends.yml @@ -58,6 +58,7 @@ jobs: needs: save-sealos secrets: inherit strategy: + fail-fast: false matrix: module: [ From 95dfd0f7942b3e34aecbfe4799ded2c8e580b4d6 Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sat, 18 Jan 2025 13:32:32 +0800 Subject: [PATCH 09/18] fix: cluster-image-build --- .github/workflows/frontend.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 518a225e0ce..856db18312a 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -188,9 +188,9 @@ jobs: artifact_name: sealos-frontend cluster-image-build: - if: ${{ inputs.push_image }} + if: ${{ inputs.push_image }} needs: - - image-build + - image-release - save-sealos runs-on: ubuntu-latest steps: From 401e240af648a694ef3346293fc08904f64ecfbc Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sat, 18 Jan 2025 13:34:23 +0800 Subject: [PATCH 10/18] fix: save sealos --- .github/workflows/frontend.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 856db18312a..ef820073dd4 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -183,7 +183,7 @@ jobs: save-sealos: uses: ./.github/workflows/import-save-sealos.yml - if: ${{ inputs.save-sealos != '' && inputs.save-sealos || true }} + if: ${{ inputs.save-sealos == '' && true || inputs.save-sealos }} with: artifact_name: sealos-frontend From 8483655787d46f10ecc8e61b86b1fa82e9c1a2a4 Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sat, 18 Jan 2025 13:38:53 +0800 Subject: [PATCH 11/18] fix: save sealos --- .github/workflows/frontend.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index ef820073dd4..8321f50ed8b 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -183,7 +183,7 @@ jobs: save-sealos: uses: ./.github/workflows/import-save-sealos.yml - if: ${{ inputs.save-sealos == '' && true || inputs.save-sealos }} + if: ${{ inputs.save-sealos }} with: artifact_name: sealos-frontend From 183a66971d08628d995c14b8357bbd0c3f8db86f Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sat, 18 Jan 2025 13:45:33 +0800 Subject: [PATCH 12/18] fix: save sealos --- .github/workflows/frontend.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 8321f50ed8b..689205ea1bd 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -22,22 +22,6 @@ on: default: "latest" required: false type: string - workflow_dispatch: - inputs: - module: - description: "Module" - required: true - type: string - push_image: - description: "Push image" - required: false - type: boolean - default: false - push_image_tag: - description: "Push image tag" - default: "latest" - required: false - type: string env: # Common versions From b02e31ed64b9ad573e6c427d2e6241c1378d3868 Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sat, 18 Jan 2025 14:08:44 +0800 Subject: [PATCH 13/18] fix: save sealos --- .github/workflows/frontend.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 689205ea1bd..a8c6137006d 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -172,10 +172,10 @@ jobs: artifact_name: sealos-frontend cluster-image-build: - if: ${{ inputs.push_image }} needs: - image-release - save-sealos + if: ${{ !failure() && inputs.push_image }} runs-on: ubuntu-latest steps: - name: Checkout From ca9b7dc6376c5d20e2b5a3848d3e187c5d10966f Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sat, 18 Jan 2025 14:26:31 +0800 Subject: [PATCH 14/18] chore: bump action use deps --- .github/workflows/bot-auto-cherry-pick.yml | 2 +- .github/workflows/bot-cherry-pick.yml | 4 +- .github/workflows/bot-issues-translator.yml | 2 +- .github/workflows/bot-labels.yml | 2 +- .github/workflows/bot.yml | 4 +- .github/workflows/check-coverage.yml | 6 +-- .github/workflows/check-format-code.yml | 6 +-- .github/workflows/check-license.yml | 6 +-- .github/workflows/check-link-error.yml | 4 +- .github/workflows/check-semgrep.yml | 4 +- .github/workflows/ci-patch-image.yml | 16 ++++---- .github/workflows/ci.yml | 12 +++--- .github/workflows/cloud-release.yml | 4 +- .github/workflows/cloud.yml | 4 +- .github/workflows/controllers.yml | 30 +++++++-------- .github/workflows/delete_workflow.yml | 2 +- .github/workflows/deploy-docs-preview.yml | 8 ++-- .github/workflows/deploy-docs-site.yml | 4 +- .github/workflows/docs-site-image.yml | 8 ++-- .github/workflows/e2e_k3s_multi_node.yml | 4 +- .github/workflows/e2e_k8s_multi_node.yml | 4 +- .github/workflows/e2e_test_core.yml | 2 +- .github/workflows/e2e_test_core_k3s.yml | 2 +- .github/workflows/e2e_test_image_cri_shim.yml | 2 +- .github/workflows/frontend.yml | 14 +++---- .github/workflows/frontends.yml | 2 + .github/workflows/import-patch-image.yml | 38 +++++++++---------- .github/workflows/import-save-sealos.yml | 2 +- .github/workflows/objectstorage.yaml | 4 +- .github/workflows/release.yml | 16 ++++---- .github/workflows/services.yml | 30 +++++++-------- .github/workflows/sync_code.yml | 4 +- .github/workflows/sync_docs.yml | 4 +- .github/workflows/webhooks.yml | 22 +++++------ 34 files changed, 140 insertions(+), 138 deletions(-) diff --git a/.github/workflows/bot-auto-cherry-pick.yml b/.github/workflows/bot-auto-cherry-pick.yml index 608d523a013..ecba3750ffc 100644 --- a/.github/workflows/bot-auto-cherry-pick.yml +++ b/.github/workflows/bot-auto-cherry-pick.yml @@ -6,7 +6,7 @@ on: jobs: comment: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Comment cherry-pick command uses: actions/github-script@v5 diff --git a/.github/workflows/bot-cherry-pick.yml b/.github/workflows/bot-cherry-pick.yml index 183ee3e251d..670d4f2f836 100644 --- a/.github/workflows/bot-cherry-pick.yml +++ b/.github/workflows/bot-cherry-pick.yml @@ -6,7 +6,7 @@ jobs: cherry-pick: name: Cherry Pick if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/cherry-pick') && github.event.comment.user.login=='sealos-ci-robot' - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Write vars id: set-target @@ -26,7 +26,7 @@ jobs: fi echo "prNumber=$PR_NUMBER" >> $GITHUB_OUTPUT - name: Checkout the latest code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.GH_PAT }} fetch-depth: 0 diff --git a/.github/workflows/bot-issues-translator.yml b/.github/workflows/bot-issues-translator.yml index bc29458d81e..823fc578d23 100644 --- a/.github/workflows/bot-issues-translator.yml +++ b/.github/workflows/bot-issues-translator.yml @@ -10,7 +10,7 @@ jobs: issues: write discussions: write pull-requests: write - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: usthe/issues-translate-action@v2.7 with: diff --git a/.github/workflows/bot-labels.yml b/.github/workflows/bot-labels.yml index ff15f94f4cb..54d46ed9e2e 100644 --- a/.github/workflows/bot-labels.yml +++ b/.github/workflows/bot-labels.yml @@ -7,7 +7,7 @@ jobs: permissions: contents: read pull-requests: write - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/labeler@v4 with: diff --git a/.github/workflows/bot.yml b/.github/workflows/bot.yml index cee8bc2dbe1..7cd1a037c89 100644 --- a/.github/workflows/bot.yml +++ b/.github/workflows/bot.yml @@ -6,10 +6,10 @@ on: jobs: comment: if: startswith(github.event.comment.body, '/') - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout the latest code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Gh Robot for Sealos uses: labring/robot@v2.0.0 with: diff --git a/.github/workflows/check-coverage.yml b/.github/workflows/check-coverage.yml index fa92da48b7b..23ba7c346f6 100644 --- a/.github/workflows/check-coverage.yml +++ b/.github/workflows/check-coverage.yml @@ -25,13 +25,13 @@ env: jobs: coverage: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Golang with cache - uses: magnetikonline/action-golang-cache@v3 + uses: magnetikonline/action-golang-cache@v5 with: go-version: ${{ env.GO_VERSION }} diff --git a/.github/workflows/check-format-code.yml b/.github/workflows/check-format-code.yml index 6215a7e4d02..9de0b54c75c 100755 --- a/.github/workflows/check-format-code.yml +++ b/.github/workflows/check-format-code.yml @@ -25,16 +25,16 @@ env: jobs: format-code: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.head_ref }} - name: Setup Golang with cache - uses: magnetikonline/action-golang-cache@v3 + uses: magnetikonline/action-golang-cache@v5 with: go-version: ${{ env.GO_VERSION }} diff --git a/.github/workflows/check-license.yml b/.github/workflows/check-license.yml index 378bf78269c..fa3a5ffc3f4 100755 --- a/.github/workflows/check-license.yml +++ b/.github/workflows/check-license.yml @@ -25,15 +25,15 @@ env: jobs: check-license: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: ${{ env.GO_VERSION }} diff --git a/.github/workflows/check-link-error.yml b/.github/workflows/check-link-error.yml index c65dd13bd7e..87887a08df9 100644 --- a/.github/workflows/check-link-error.yml +++ b/.github/workflows/check-link-error.yml @@ -7,9 +7,9 @@ on: jobs: linkChecker: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} diff --git a/.github/workflows/check-semgrep.yml b/.github/workflows/check-semgrep.yml index c0a2ab55e22..405e5012e62 100644 --- a/.github/workflows/check-semgrep.yml +++ b/.github/workflows/check-semgrep.yml @@ -25,7 +25,7 @@ jobs: # User-definable name of this GitHub Actions job: name: Scan # If you are self-hosting, change the following `runs-on` value: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 container: # A Docker image with Semgrep installed. Do not change this. @@ -39,7 +39,7 @@ jobs: steps: # Fetch project source with GitHub Actions Checkout. - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Run the "semgrep ci" command on the command line of the docker image. - run: | diff --git a/.github/workflows/ci-patch-image.yml b/.github/workflows/ci-patch-image.yml index 87ec6e05f6a..f1390f0f426 100755 --- a/.github/workflows/ci-patch-image.yml +++ b/.github/workflows/ci-patch-image.yml @@ -46,11 +46,11 @@ jobs: container-sealos: needs: [ call_ci_workflow ] - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 if: ${{ (github.event_name == 'push') || (inputs.push_mage == true) }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Expose git commit data uses: rlespinasse/git-commit-data-action@v1 - # Add support for more platforms with QEMU (optional) @@ -58,12 +58,12 @@ jobs: name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 with: driver-opts: network=host - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -110,12 +110,12 @@ jobs: if: ${{ (github.event_name == 'push') || (inputs.push_mage == true) }} needs: - container-sealos - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: issues: write steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Expose git commit data uses: rlespinasse/git-commit-data-action@v1 - name: Renew issue and Sync Images @@ -141,12 +141,12 @@ jobs: needs: - call_ci_workflow - save-sealos - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: issues: write steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download sealos uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 11601ebee4d..89a3ddf7864 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,12 +40,12 @@ on: jobs: resolve-modules: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Resolve Modules id: set-matrix @@ -53,15 +53,15 @@ jobs: golangci-lint: needs: [ resolve-modules ] - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: ${{ fromJson(needs.resolve-modules.outputs.matrix) }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Golang with cache - uses: magnetikonline/action-golang-cache@v3 + uses: magnetikonline/action-golang-cache@v5 with: go-version: ${{ env.GO_VERSION }} @@ -69,7 +69,7 @@ jobs: run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev - name: Run Linter - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: version: v1.54.2 working-directory: ${{ matrix.workdir }} diff --git a/.github/workflows/cloud-release.yml b/.github/workflows/cloud-release.yml index c7ab2032aee..cf118f0947d 100644 --- a/.github/workflows/cloud-release.yml +++ b/.github/workflows/cloud-release.yml @@ -75,7 +75,7 @@ jobs: OSS_BUCKET: ${{ secrets.OSS_BUCKET }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download sealos uses: actions/download-artifact@v4 with: @@ -114,7 +114,7 @@ jobs: OSS_BUCKET: ${{ secrets.OSS_BUCKET }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download sealos uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/cloud.yml b/.github/workflows/cloud.yml index f244f05a69c..4fa19378af0 100644 --- a/.github/workflows/cloud.yml +++ b/.github/workflows/cloud.yml @@ -65,10 +65,10 @@ jobs: if: ${{ (github.event_name == 'release') ||(github.event_name == 'push') || (inputs.push_image == true) }} needs: - save-sealos - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Expose git commit data diff --git a/.github/workflows/controllers.yml b/.github/workflows/controllers.yml index 69ee063c0e6..cf159750183 100644 --- a/.github/workflows/controllers.yml +++ b/.github/workflows/controllers.yml @@ -50,12 +50,12 @@ env: LICENSE_KEY: ${{ secrets.LICENSE_KEY }} jobs: resolve-modules: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Resolve Modules id: set-matrix @@ -64,28 +64,28 @@ jobs: golangci-lint: if: ${{ github.event_name }} == 'push' || ${{ github.event_name }} == 'pull_request' needs: [ resolve-modules ] - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: ${{ fromJson(needs.resolve-modules.outputs.matrix) }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Golang with cache - uses: magnetikonline/action-golang-cache@v3 + uses: magnetikonline/action-golang-cache@v5 with: go-version: ${{ env.GO_VERSION }} - name: Install Dependencies run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev - name: Run Linter - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: version: v1.54.2 working-directory: ${{ matrix.workdir }} args: "--out-${NO_FUTURE}format colored-line-number" image-build: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: matrix: module: @@ -103,12 +103,12 @@ jobs: - { name: objectstorage, path: objectstorage } steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Golang with cache - uses: magnetikonline/action-golang-cache@v3 + uses: magnetikonline/action-golang-cache@v5 with: go-version: ${{ env.GO_VERSION }} @@ -150,12 +150,12 @@ jobs: name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 with: driver-opts: network=host - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }} with: registry: ghcr.io @@ -163,7 +163,7 @@ jobs: password: ${{ secrets.GH_PAT }} - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | ghcr.io/${{ github.repository_owner }}/sealos-${{ matrix.module.name }}-controller @@ -172,7 +172,7 @@ jobs: type=raw,value=${{ steps.prepare.outputs.tag_name }},enable=true - name: build (and publish) ${{ matrix.module.name }} main image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: ./controllers/${{ matrix.module.path }} file: ./controllers/${{ matrix.module.path }}/Dockerfile @@ -190,7 +190,7 @@ jobs: needs: - image-build - save-sealos - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: matrix: module: @@ -208,7 +208,7 @@ jobs: - { name: objectstorage, path: objectstorage } steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/delete_workflow.yml b/.github/workflows/delete_workflow.yml index 263c2f41aa0..38cab465e51 100644 --- a/.github/workflows/delete_workflow.yml +++ b/.github/workflows/delete_workflow.yml @@ -30,7 +30,7 @@ on: jobs: del_runs: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Delete workflow runs uses: Mattraks/delete-workflow-runs@v2 diff --git a/.github/workflows/deploy-docs-preview.yml b/.github/workflows/deploy-docs-preview.yml index d53f2b149dd..a8465634290 100644 --- a/.github/workflows/deploy-docs-preview.yml +++ b/.github/workflows/deploy-docs-preview.yml @@ -32,7 +32,7 @@ jobs: name: Preview url: ${{ steps.vercel-action.outputs.preview-url }} - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 # Job outputs outputs: @@ -40,7 +40,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} @@ -91,9 +91,9 @@ jobs: docsOutput: needs: [ build ] - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} diff --git a/.github/workflows/deploy-docs-site.yml b/.github/workflows/deploy-docs-site.yml index a2d1cdef61c..342e85c59ff 100644 --- a/.github/workflows/deploy-docs-site.yml +++ b/.github/workflows/deploy-docs-site.yml @@ -26,10 +26,10 @@ env: jobs: build: name: Build - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Detect package manager id: detect-package-manager diff --git a/.github/workflows/docs-site-image.yml b/.github/workflows/docs-site-image.yml index 8e3bc0199d0..6cb4ef2fb87 100644 --- a/.github/workflows/docs-site-image.yml +++ b/.github/workflows/docs-site-image.yml @@ -9,7 +9,7 @@ on: jobs: build-docs-image: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.ALI_HUB_PASSWORD }} - name: Build and push Docker images to ghcr.io and Aliyun Hub - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: ./docs file: ./docs/website/Dockerfile @@ -65,11 +65,11 @@ jobs: update-docs-image: needs: build-docs-image - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: github.repository == 'labring/sealos' steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: actions-hub/kubectl@master env: KUBE_CONFIG: ${{ secrets.SEALOS_TOP_KUBE_CONF }} diff --git a/.github/workflows/e2e_k3s_multi_node.yml b/.github/workflows/e2e_k3s_multi_node.yml index da74ac52a9a..cd7910edded 100644 --- a/.github/workflows/e2e_k3s_multi_node.yml +++ b/.github/workflows/e2e_k3s_multi_node.yml @@ -19,7 +19,7 @@ jobs: target_pull: true e2e_apply_test: needs: [ call_ci_workflow ] - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: issues: write strategy: @@ -80,7 +80,7 @@ jobs: echo 'test_${{ matrix.arch }}_result=success' >> "$GITHUB_OUTPUT" issue_commit: needs: [ e2e_apply_test ] - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: issues: write if: ${{ always() && github.event.label.name == 'need-e2e-apply-test' }} #success() || failure() diff --git a/.github/workflows/e2e_k8s_multi_node.yml b/.github/workflows/e2e_k8s_multi_node.yml index 22bdf1478de..8940d9d8582 100644 --- a/.github/workflows/e2e_k8s_multi_node.yml +++ b/.github/workflows/e2e_k8s_multi_node.yml @@ -19,7 +19,7 @@ jobs: target_pull: true e2e_apply_test: needs: [ call_ci_workflow ] - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: issues: write strategy: @@ -80,7 +80,7 @@ jobs: echo 'test_${{ matrix.arch }}_result=success' >> "$GITHUB_OUTPUT" issue_commit: needs: [ e2e_apply_test ] - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: issues: write if: ${{ always() && github.event.label.name == 'need-e2e-apply-test' }} #success() || failure() diff --git a/.github/workflows/e2e_test_core.yml b/.github/workflows/e2e_test_core.yml index d65f056e827..446c5d5f377 100644 --- a/.github/workflows/e2e_test_core.yml +++ b/.github/workflows/e2e_test_core.yml @@ -60,7 +60,7 @@ jobs: E2E_sealos_runtime_version_docker_127_test, E2E_sealos_runtime_version_docker_128_test ] - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Download image-cri-shim uses: actions/download-artifact@v4 diff --git a/.github/workflows/e2e_test_core_k3s.yml b/.github/workflows/e2e_test_core_k3s.yml index 2ef9908dd62..50769a8522d 100644 --- a/.github/workflows/e2e_test_core_k3s.yml +++ b/.github/workflows/e2e_test_core_k3s.yml @@ -34,7 +34,7 @@ jobs: [ E2E_sealos_k3s_basic_test, ] - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Download image-cri-shim uses: actions/download-artifact@v4 diff --git a/.github/workflows/e2e_test_image_cri_shim.yml b/.github/workflows/e2e_test_image_cri_shim.yml index 89c79c698a4..64cf947c883 100644 --- a/.github/workflows/e2e_test_image_cri_shim.yml +++ b/.github/workflows/e2e_test_image_cri_shim.yml @@ -26,7 +26,7 @@ jobs: image: false verify-image_cri_shim: needs: [ call_ci_workflow ] - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Install Dependencies run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index a8c6137006d..cdca688d008 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -39,7 +39,7 @@ jobs: runs-on: ${{ matrix.runs-on || 'ubuntu-24.04' }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -52,7 +52,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | ${{ env.GHCR_REPO }} @@ -70,7 +70,7 @@ jobs: - name: Build id: build - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: ./frontend file: ./frontend/Dockerfile @@ -101,7 +101,7 @@ jobs: if: ${{ inputs.push_image }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -147,7 +147,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | ${{ env.GHCR_REPO }} @@ -176,10 +176,10 @@ jobs: - image-release - save-sealos if: ${{ !failure() && inputs.push_image }} - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Extract module name diff --git a/.github/workflows/frontends.yml b/.github/workflows/frontends.yml index 8c71d6beb15..1f1da7b4529 100644 --- a/.github/workflows/frontends.yml +++ b/.github/workflows/frontends.yml @@ -1,6 +1,8 @@ name: Build Frontends Image on: + create: + tags: workflow_call: inputs: push_image: diff --git a/.github/workflows/import-patch-image.yml b/.github/workflows/import-patch-image.yml index 13b5ee2b0d8..20de191621a 100755 --- a/.github/workflows/import-patch-image.yml +++ b/.github/workflows/import-patch-image.yml @@ -26,15 +26,15 @@ on: jobs: resolve-modules-arch: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: Checkout if: ${{ (inputs.target_pull == false) }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Checkout by Pull Request Target - uses: actions/checkout@v3 + uses: actions/checkout@v4 if: ${{ (inputs.target_pull == true) }} with: ref: ${{ github.event.pull_request.head.ref }} @@ -43,15 +43,15 @@ jobs: id: set-matrix run: bash ./scripts/resolve-patch-modules.sh ${{ inputs.arch }} "true" resolve-modules: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: Checkout if: ${{ (inputs.target_pull == false) }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Checkout by Pull Request Target - uses: actions/checkout@v3 + uses: actions/checkout@v4 if: ${{ (inputs.target_pull == true) }} with: ref: ${{ github.event.pull_request.head.ref }} @@ -61,23 +61,23 @@ jobs: run: bash ./scripts/resolve-patch-modules.sh ${{ inputs.arch }} build: needs: [ resolve-modules ] - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: ${{ fromJson(needs.resolve-modules.outputs.matrix) }} steps: - name: Checkout if: ${{ (inputs.target_pull == false) }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Checkout by Pull Request Target - uses: actions/checkout@v3 + uses: actions/checkout@v4 if: ${{ (inputs.target_pull == true) }} with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Setup Golang with cache - uses: magnetikonline/action-golang-cache@v3 + uses: magnetikonline/action-golang-cache@v5 with: go-version: ${{ env.GO_VERSION }} @@ -98,22 +98,22 @@ jobs: name: ${{ matrix.binary }}-${{ matrix.arch }} path: bin/linux_${{ matrix.arch}}/${{ matrix.binary }} test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 if: ${{ (inputs.e2e == true) }} steps: - name: Checkout if: ${{ (inputs.target_pull == false) }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Checkout by Pull Request Target - uses: actions/checkout@v3 + uses: actions/checkout@v4 if: ${{ (inputs.target_pull == true) }} with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Setup Golang with cache - uses: magnetikonline/action-golang-cache@v3 + uses: magnetikonline/action-golang-cache@v5 with: go-version: ${{ env.GO_VERSION }} - name: Install Dependencies @@ -129,7 +129,7 @@ jobs: path: test/e2e/e2e.test docker: needs: [ resolve-modules-arch,build ] - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 if: ${{ (inputs.image == true) }} services: registry: @@ -141,9 +141,9 @@ jobs: steps: - name: Checkout if: ${{ (inputs.target_pull == false) }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Checkout by Pull Request Target - uses: actions/checkout@v3 + uses: actions/checkout@v4 if: ${{ (inputs.target_pull == true) }} with: ref: ${{ github.event.pull_request.head.ref }} @@ -176,7 +176,7 @@ jobs: path: docker/sealos - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 with: driver-opts: network=host @@ -187,7 +187,7 @@ jobs: chmod a+x docker/lvscare/* - name: Build and Push lvscare Image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v6 with: context: docker/lvscare file: docker/lvscare/Dockerfile.main diff --git a/.github/workflows/import-save-sealos.yml b/.github/workflows/import-save-sealos.yml index 2b91cacfb54..5c2aee8e2b6 100755 --- a/.github/workflows/import-save-sealos.yml +++ b/.github/workflows/import-save-sealos.yml @@ -14,7 +14,7 @@ on: jobs: save-sealos: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Install sealos uses: labring/sealos-action@v0.0.7 diff --git a/.github/workflows/objectstorage.yaml b/.github/workflows/objectstorage.yaml index 6a73be61f26..f27e59fe15a 100644 --- a/.github/workflows/objectstorage.yaml +++ b/.github/workflows/objectstorage.yaml @@ -67,10 +67,10 @@ jobs: if: ${{ (github.event_name == 'release') ||(github.event_name == 'push') || (inputs.push_image == true) }} needs: - save-sealos - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Expose git commit data diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2c5f7ef858e..ee6440b2d54 100755 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,15 +14,15 @@ on: jobs: goreleaser: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Golang with cache - uses: magnetikonline/action-golang-cache@v3 + uses: magnetikonline/action-golang-cache@v5 with: go-version: ${{ env.GO_VERSION }} @@ -33,7 +33,7 @@ jobs: qemu-user-static binfmt-support - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -49,12 +49,12 @@ jobs: FURY_TOKEN: ${{ secrets.FURY_TOKEN }} sync: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: - goreleaser steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Fetch Current version @@ -91,12 +91,12 @@ jobs: SEALOS_COMMENT_BODY: "/imagebuild_apps sealos ${{steps.get-current-tag.outputs.tag }}" changelog: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: - goreleaser steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Fetch Current version diff --git a/.github/workflows/services.yml b/.github/workflows/services.yml index 75b7b2850ba..8cadba18cbf 100644 --- a/.github/workflows/services.yml +++ b/.github/workflows/services.yml @@ -50,12 +50,12 @@ env: jobs: resolve-modules: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Resolve Modules id: set-matrix @@ -63,39 +63,39 @@ jobs: golangci-lint: needs: [ resolve-modules ] - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: ${{ fromJson(needs.resolve-modules.outputs.matrix) }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Golang with cache - uses: magnetikonline/action-golang-cache@v3 + uses: magnetikonline/action-golang-cache@v5 with: go-version: ${{ env.GO_VERSION }} - name: Run Linter - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: version: v1.54.2 working-directory: ${{ matrix.workdir }} args: "--out-${NO_FUTURE}format colored-line-number" image-build: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: matrix: ## TODO: add more modules module: [ database, pay, account, minio, launchpad, exceptionmonitor, aiproxy, devbox ] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Golang with cache - uses: magnetikonline/action-golang-cache@v3 + uses: magnetikonline/action-golang-cache@v5 with: go-version: ${{ env.GO_VERSION }} @@ -138,12 +138,12 @@ jobs: name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 with: driver-opts: network=host - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ (github.event_name == 'push') ||(github.event_name == 'create') || (inputs.push_image == true) }} with: registry: ghcr.io @@ -152,7 +152,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | ghcr.io/${{ github.repository_owner }}/sealos-${{ matrix.module }}-service @@ -161,7 +161,7 @@ jobs: type=raw,value=${{ steps.prepare.outputs.tag_name }},enable=true - name: build (and publish) ${{ matrix.module }} main image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: ./service/${{ matrix.module }} file: ./service/${{ matrix.module }}/Dockerfile @@ -180,14 +180,14 @@ jobs: needs: - image-build - save-sealos - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: matrix: ## TODO: add more modules module: [ database, pay, account, minio, launchpad, exceptionmonitor, aiproxy, devbox ] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/sync_code.yml b/.github/workflows/sync_code.yml index cb19b9f704f..1ef254953d2 100644 --- a/.github/workflows/sync_code.yml +++ b/.github/workflows/sync_code.yml @@ -8,10 +8,10 @@ on: workflow_dispatch: jobs: sync: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run GitHub File Sync # Can update to v1 when https://github.com/BetaHuhn/repo-file-sync-action/issues/168 is resolved diff --git a/.github/workflows/sync_docs.yml b/.github/workflows/sync_docs.yml index 9bd054624a8..71f9300c0a2 100644 --- a/.github/workflows/sync_docs.yml +++ b/.github/workflows/sync_docs.yml @@ -9,10 +9,10 @@ on: workflow_dispatch: jobs: sync: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run GitHub File Sync uses: BetaHuhn/repo-file-sync-action@v1.21.0 diff --git a/.github/workflows/webhooks.yml b/.github/workflows/webhooks.yml index 47d05e8a276..dd6248e315c 100644 --- a/.github/workflows/webhooks.yml +++ b/.github/workflows/webhooks.yml @@ -28,12 +28,12 @@ env: jobs: resolve-modules: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Resolve Modules id: set-matrix @@ -41,15 +41,15 @@ jobs: golangci-lint: needs: [ resolve-modules ] - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: ${{ fromJson(needs.resolve-modules.outputs.matrix) }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Golang with cache - uses: magnetikonline/action-golang-cache@v3 + uses: magnetikonline/action-golang-cache@v5 with: go-version: ${{ env.GO_VERSION }} @@ -57,25 +57,25 @@ jobs: run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev - name: Run Linter - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: version: v1.54.2 working-directory: ${{ matrix.workdir }} args: "--out-${NO_FUTURE}format colored-line-number" image-build: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: matrix: module: [ admission ] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Golang with cache - uses: magnetikonline/action-golang-cache@v3 + uses: magnetikonline/action-golang-cache@v5 with: go-version: ${{ env.GO_VERSION }} @@ -107,12 +107,12 @@ jobs: name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 with: driver-opts: network=host - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ (github.event_name == 'push') || (inputs.push_mage == true) }} with: registry: ghcr.io From aea3b3ac1a502ed1ff73037a8f361190bb185dde Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sat, 18 Jan 2025 14:44:30 +0800 Subject: [PATCH 15/18] chore: bump action use deps --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ee6440b2d54..c82057c3637 100755 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: password: ${{ secrets.GH_RELEASE_PAT }} - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v3 + uses: goreleaser/goreleaser-action@v6 with: args: release --clean --release-footer-tmpl=scripts/release/footer.md.tmpl --release-header-tmpl=scripts/release/head.md.tmpl env: From c0fabd272fb6abde75f32ab3c0473f2e12f0c889 Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sat, 18 Jan 2025 14:48:52 +0800 Subject: [PATCH 16/18] fix: release frontend tag --- .github/workflows/cloud-release.yml | 2 +- frontend/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cloud-release.yml b/.github/workflows/cloud-release.yml index cf118f0947d..221bf62ead7 100644 --- a/.github/workflows/cloud-release.yml +++ b/.github/workflows/cloud-release.yml @@ -36,7 +36,7 @@ jobs: release-frontends: if: ${{ github.event.inputs.build_offline_tar_only == false }} - uses: ./.github/workflows/frontend.yml + uses: ./.github/workflows/frontends.yml with: push_image: true push_image_tag: ${{ github.event.inputs.tag || github.event.release.tag_name }} diff --git a/frontend/README.md b/frontend/README.md index ea1c24f7d97..29edd757441 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -68,7 +68,7 @@ make push-images DOCKER_USERNAME= IMAGE_TAG= Refer to other apps to add some configuration. -1. .github/workflows/frontend.yml +1. .github/workflows/frontends.yml 2. deploy/cloud/init.sh 3. deploy/cloud/scripts/init.sh 4. frontend/providers/app/deploy/manifests/appcr.yaml.tmpl From 18360abbf7d4eb0e14bca2b688a3220d3165503e Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sat, 18 Jan 2025 15:20:34 +0800 Subject: [PATCH 17/18] fix: default latest --- .github/workflows/frontend.yml | 2 +- .github/workflows/frontends.yml | 5 ----- scripts/resolve-tag-image.sh | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index cdca688d008..15849103bb7 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -201,7 +201,7 @@ jobs: - name: Prepare id: prepare run: | - tag_name=$(bash ./scripts/resolve-tag-image.sh "${{ inputs.push_image }}" "${{ steps.check_tag.outputs.isTag }}" "${{ inputs.push_image_tag }}") + tag_name=$(bash ./scripts/resolve-tag-image.sh "${{ inputs.push_image }}" "${{ steps.check_tag.outputs.isTag }}" "${{ inputs.push_image_tag }}") echo old_docker_repo=ghcr.io/labring/sealos-${{ env.MODULE_NAME }}-frontend >> $GITHUB_OUTPUT echo old_docker_image=ghcr.io/labring/sealos-${{ env.MODULE_NAME }}-frontend:latest >> $GITHUB_OUTPUT echo new_docker_repo=ghcr.io/${{ github.repository_owner }}/sealos-${{ env.MODULE_NAME }}-frontend >> $GITHUB_OUTPUT diff --git a/.github/workflows/frontends.yml b/.github/workflows/frontends.yml index 1f1da7b4529..6f9e600c9e9 100644 --- a/.github/workflows/frontends.yml +++ b/.github/workflows/frontends.yml @@ -44,11 +44,6 @@ on: - "!**/*.md" - "!**/*.yaml" -env: - # Common versions - GO_VERSION: "1.20" - DEFAULT_OWNER: "labring" - jobs: save-sealos: uses: ./.github/workflows/import-save-sealos.yml diff --git a/scripts/resolve-tag-image.sh b/scripts/resolve-tag-image.sh index 36fad1db802..60e681fc037 100644 --- a/scripts/resolve-tag-image.sh +++ b/scripts/resolve-tag-image.sh @@ -7,7 +7,7 @@ push_image=${1:-false} release=${2:-false} if [[ "$push_image" == true ]]; then - tag_name=${3} + tag_name=${3:-latest} elif [[ "$release" == true ]]; then tag_name=${GITHUB_REF#refs/tags/} fi From da1a683a1e3e3af2e7aff3b21b563afa9257a40d Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Sat, 18 Jan 2025 15:44:50 +0800 Subject: [PATCH 18/18] feat: delete save sealos --- .github/workflows/frontend.yml | 14 +------------- .github/workflows/frontends.yml | 1 - 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 15849103bb7..3a554d7be32 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -3,11 +3,6 @@ name: Build Frontend Image on: workflow_call: inputs: - save-sealos: - description: "Save sealos" - required: false - type: boolean - default: true module: description: "Module" required: true @@ -165,17 +160,10 @@ jobs: run: | docker buildx imagetools inspect ${{ env.GHCR_REPO }}:${{ steps.meta.outputs.version }} - save-sealos: - uses: ./.github/workflows/import-save-sealos.yml - if: ${{ inputs.save-sealos }} - with: - artifact_name: sealos-frontend - cluster-image-build: needs: - image-release - - save-sealos - if: ${{ !failure() && inputs.push_image }} + if: ${{ inputs.push_image }} runs-on: ubuntu-24.04 steps: - name: Checkout diff --git a/.github/workflows/frontends.yml b/.github/workflows/frontends.yml index 6f9e600c9e9..d8aed24959f 100644 --- a/.github/workflows/frontends.yml +++ b/.github/workflows/frontends.yml @@ -74,7 +74,6 @@ jobs: desktop, ] with: - save-sealos: false module: ${{ matrix.module }} push_image: ${{ (github.event_name == 'push') || (github.event_name == 'create') || (inputs.push_image == true) }} push_image_tag: ${{ inputs.push_image_tag }}