From f3415f4403880cef422a20913fa41fae09d93a36 Mon Sep 17 00:00:00 2001 From: cuisongliu Date: Sun, 16 Jul 2023 16:03:56 +0800 Subject: [PATCH] build(main): add ci for latest (#3513) Signed-off-by: cuisongliu --- .github/workflows/ci-patch-image.yml | 13 +++++++----- .github/workflows/services.yml | 30 ++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci-patch-image.yml b/.github/workflows/ci-patch-image.yml index e40570bace2..db579ad5feb 100755 --- a/.github/workflows/ci-patch-image.yml +++ b/.github/workflows/ci-patch-image.yml @@ -169,11 +169,14 @@ jobs: bash docker/patch/manifest-cluster-images.sh env: OWNER: ${{ github.repository_owner }} - - name: Prepare - id: prepare + - name: Manifest Cluster Images for latest run: | - TAG=dev - echo tag_name=${GIT_COMMIT_SHORT_SHA} >> $GITHUB_OUTPUT + sudo sealos tag ghcr.io/${{ github.repository_owner }}/sealos-patch:"$GIT_COMMIT_SHORT_SHA"-amd64 ghcr.io/${{ github.repository_owner }}/sealos-patch:latest-amd64 + sudo sealos tag ghcr.io/${{ github.repository_owner }}/sealos-patch:"$GIT_COMMIT_SHORT_SHA"-arm64 ghcr.io/${{ github.repository_owner }}/sealos-patch:latest-arm64 + sudo sealos images + bash docker/patch/manifest-cluster-images.sh ghcr.io/${{ github.repository_owner }}/sealos-patch:latest + env: + OWNER: ${{ github.repository_owner }} - name: Renew issue and Sync Images uses: labring/gh-rebot@v0.0.6 if: ${{ github.repository_owner == env.DEFAULT_OWNER }} @@ -187,4 +190,4 @@ jobs: SEALOS_ISSUE_LABEL: "dayly-report" SEALOS_ISSUE_TYPE: "day" SEALOS_ISSUE_REPO: "labring-actions/cluster-image" - SEALOS_COMMENT_BODY: "/imagesync ghcr.io/${{ github.repository_owner }}/sealos-patch:${{ steps.prepare.outputs.tag_name }}" + SEALOS_COMMENT_BODY: "/imagesync ghcr.io/${{ github.repository_owner }}/sealos-patch:latest" diff --git a/.github/workflows/services.yml b/.github/workflows/services.yml index 67b0016b4f8..f4e21f1c0ef 100644 --- a/.github/workflows/services.yml +++ b/.github/workflows/services.yml @@ -222,16 +222,16 @@ jobs: CLUSTER_IMAGE_NAME=${{ steps.prepare.outputs.cluster_repo }}:${{ steps.prepare.outputs.tag_name }} sudo sealos build -t ${CLUSTER_IMAGE_NAME}-amd64 --platform linux/amd64 -f Kubefile sudo sealos build -t ${CLUSTER_IMAGE_NAME}-arm64 --platform linux/arm64 -f Kubefile - - - name: Manifest Cluster Images - # if push to master, then patch images to ghcr.io - run: | - CLUSTER_IMAGE_NAME=${{ steps.prepare.outputs.cluster_repo }}:${{ steps.prepare.outputs.tag_name }} sudo sealos images bash docker/patch/manifest-cluster-images.sh $CLUSTER_IMAGE_NAME - env: - OWNER: ${{ github.repository_owner }} - + - name: Build ${{ matrix.module }}-service cluster image for latest + working-directory: service/${{ matrix.module }}/deploy + run: | + CLUSTER_IMAGE_NAME_LATEST=${{ steps.prepare.outputs.cluster_repo }}:latest + sudo sealos build -t ${CLUSTER_IMAGE_NAME_LATEST}-amd64 --platform linux/amd64 -f Kubefile + sudo sealos build -t ${CLUSTER_IMAGE_NAME_LATEST}-arm64 --platform linux/arm64 -f Kubefile + sudo sealos images + bash docker/patch/manifest-cluster-images.sh $CLUSTER_IMAGE_NAME_LATEST - name: Renew issue and Sync Images uses: labring/gh-rebot@v0.0.6 if: ${{ github.repository_owner == env.DEFAULT_OWNER }} @@ -246,3 +246,17 @@ jobs: SEALOS_ISSUE_TYPE: "day" SEALOS_ISSUE_REPO: "labring-actions/cluster-image" SEALOS_COMMENT_BODY: "/imagesync ghcr.io/${{ github.repository_owner }}/sealos-cloud-${{ matrix.module }}-service:${{ steps.prepare.outputs.tag_name }}" + - name: Renew issue and Sync Images for latest + uses: labring/gh-rebot@v0.0.6 + if: ${{ github.repository_owner == env.DEFAULT_OWNER }} + 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 ghcr.io/${{ github.repository_owner }}/sealos-cloud-${{ matrix.module }}-service:latest"