diff --git a/.github/workflows/ci-patch-image.yml b/.github/workflows/ci-patch-image.yml index e40570bace2..90d3b178303 100755 --- a/.github/workflows/ci-patch-image.yml +++ b/.github/workflows/ci-patch-image.yml @@ -117,7 +117,7 @@ jobs: env: GH_TOKEN: "${{ secrets.GH_PAT }}" SEALOS_TYPE: "issue_renew" - SEALOS_ISSUE_TITLE: "[DaylyReport] Auto build for sealos" + SEALOS_ISSUE_TITLE: "【DaylyReport】 Auto build for sealos" SEALOS_ISSUE_BODYFILE: "scripts/ISSUE_RENEW.md" SEALOS_ISSUE_LABEL: "dayly-report" SEALOS_ISSUE_TYPE: "day" @@ -182,7 +182,7 @@ jobs: env: GH_TOKEN: "${{ secrets.GH_PAT }}" SEALOS_TYPE: "issue_renew" - SEALOS_ISSUE_TITLE: "[DaylyReport] Auto build for sealos" + SEALOS_ISSUE_TITLE: "【DaylyReport】 Auto build for sealos" SEALOS_ISSUE_BODYFILE: "scripts/ISSUE_RENEW.md" SEALOS_ISSUE_LABEL: "dayly-report" SEALOS_ISSUE_TYPE: "day" diff --git a/.github/workflows/cloud.yml b/.github/workflows/cloud.yml index 9b74f53c71a..816993ce135 100644 --- a/.github/workflows/cloud.yml +++ b/.github/workflows/cloud.yml @@ -99,7 +99,7 @@ jobs: env: GH_TOKEN: "${{ secrets.GH_PAT }}" SEALOS_TYPE: "issue_renew" - SEALOS_ISSUE_TITLE: "[DaylyReport] Auto build for sealos" + SEALOS_ISSUE_TITLE: "【DaylyReport】 Auto build for sealos" SEALOS_ISSUE_BODYFILE: "scripts/ISSUE_RENEW.md" SEALOS_ISSUE_LABEL: "dayly-report" SEALOS_ISSUE_TYPE: "day" diff --git a/.github/workflows/controllers.yml b/.github/workflows/controllers.yml index 708c4431495..70eda3c8ffd 100644 --- a/.github/workflows/controllers.yml +++ b/.github/workflows/controllers.yml @@ -12,7 +12,7 @@ on: default: false push_image_tag: description: "Push image tag" - default: "dev" + default: "latest" required: false type: string push: @@ -86,6 +86,7 @@ jobs: - { name: db-adminer, path: db/adminer } - { name: resources, path: resources } - { name: resources-metering, path: resources/metering } + - { name: cloud, path: cloud } steps: - name: Checkout uses: actions/checkout@v3 @@ -154,7 +155,6 @@ jobs: ghcr.io/${{ github.repository_owner }}/sealos-${{ matrix.module.name }}-controller tags: | type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} - type=raw,value=dev,enable=true type=raw,value=${{ steps.prepare.outputs.tag_name }},enable=true - name: build (and publish) ${{ matrix.module.name }} main image @@ -190,6 +190,7 @@ jobs: - { name: db-adminer, path: db/adminer } - { name: resources, path: resources } - { name: resources-metering, path: resources/metering } + - { name: cloud, path: cloud } steps: - name: Checkout uses: actions/checkout@v3 @@ -209,10 +210,12 @@ jobs: - name: Prepare id: prepare run: | - 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-${{ matrix.module.name }}-controller >> $GITHUB_OUTPUT echo new_docker_repo=ghcr.io/${{ github.repository_owner }}/sealos-${{ matrix.module.name }}-controller >> $GITHUB_OUTPUT echo cluster_repo=ghcr.io/${{ github.repository_owner }}/sealos-cloud-${{ matrix.module.name }}-controller >> $GITHUB_OUTPUT + echo cluster_image=ghcr.io/${{ github.repository_owner }}/sealos-cloud-${{ matrix.module.name }}-controller:${tag_name} >> $GITHUB_OUTPUT + echo latest_cluster_image=ghcr.io/${{ github.repository_owner }}/sealos-cloud-${{ matrix.module.name }}-controller:latest >> $GITHUB_OUTPUT - name: Download sealos uses: actions/download-artifact@v3 @@ -227,7 +230,7 @@ jobs: - name: Mutate image tag in deploy files working-directory: controllers/${{ matrix.module.path }}/deploy run: | - OLD_DOCKER_IMAGE_NAME=${{ steps.prepare.outputs.old_docker_repo }}:dev + OLD_DOCKER_IMAGE_NAME=${{ steps.prepare.outputs.old_docker_repo }}:latest NEW_DOCKER_IMAGE_NAME=${{ steps.prepare.outputs.new_docker_repo }}:${{ steps.prepare.outputs.tag_name }} sudo sed -i "s;${OLD_DOCKER_IMAGE_NAME};${NEW_DOCKER_IMAGE_NAME};" manifests/* @@ -239,22 +242,38 @@ jobs: - name: Build ${{ matrix.module.name }}-controller cluster image working-directory: controllers/${{ matrix.module.path }}/deploy run: | - 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 ${{ steps.prepare.outputs.cluster_image }}-amd64 --platform linux/amd64 -f Kubefile + sudo sealos build -t ${{ steps.prepare.outputs.latest_cluster_image }}-amd64 --platform linux/amd64 -f Kubefile # delete old registry cache sudo rm -rf registry - sudo sealos build -t ${CLUSTER_IMAGE_NAME}-arm64 --platform linux/arm64 -f Kubefile + sudo sealos build -t ${{ steps.prepare.outputs.cluster_image }}-arm64 --platform linux/arm64 -f Kubefile + sudo sealos build -t ${{ steps.prepare.outputs.latest_cluster_image }}-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 + bash docker/patch/manifest-cluster-images.sh ${{ steps.prepare.outputs.cluster_image }} + bash docker/patch/manifest-cluster-images.sh ${{ steps.prepare.outputs.latest_cluster_image }} env: OWNER: ${{ github.repository_owner }} - - name: Renew issue and Sync Images + - name: Renew issue and Sync Images for ${{ steps.prepare.outputs.cluster_image }} + 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 ${{ 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 if: ${{ github.repository_owner == env.DEFAULT_OWNER }} with: @@ -262,9 +281,9 @@ jobs: env: GH_TOKEN: "${{ secrets.GH_PAT }}" SEALOS_TYPE: "issue_renew" - SEALOS_ISSUE_TITLE: "[DaylyReport] Auto build for sealos" + 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.name }}-controller:${{ steps.prepare.outputs.tag_name }}" + SEALOS_COMMENT_BODY: "/imagesync ${{ steps.prepare.outputs.latest_cluster_image }}" diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 3851972baa5..00a6e792662 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -12,7 +12,7 @@ on: default: false push_image_tag: description: "Push image tag" - default: "dev" + default: "latest" required: false type: string push: @@ -87,7 +87,6 @@ jobs: 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=dev,enable=true type=raw,value=${{ steps.prepare.outputs.tag_name }},enable=true - name: Set up QEMU @@ -160,11 +159,12 @@ jobs: run: | 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:dev >> $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 echo new_docker_image=ghcr.io/${{ github.repository_owner }}/sealos-${{ env.MODULE_NAME }}-frontend:${tag_name} >> $GITHUB_OUTPUT echo cluster_repo=ghcr.io/${{ github.repository_owner }}/sealos-cloud-${{ env.MODULE_NAME }}-frontend >> $GITHUB_OUTPUT echo cluster_image=ghcr.io/${{ github.repository_owner }}/sealos-cloud-${{ env.MODULE_NAME }}-frontend:${tag_name} >> $GITHUB_OUTPUT + echo latest_cluster_image=ghcr.io/${{ github.repository_owner }}/sealos-cloud-${{ env.MODULE_NAME }}-frontend:latest >> $GITHUB_OUTPUT - name: Download sealos uses: actions/download-artifact@v3 @@ -186,19 +186,21 @@ jobs: 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 + sudo sealos build -t ${{ steps.prepare.outputs.latest_cluster_image }}-amd64 --platform linux/amd64 -f Kubefile # delete old registry cache sudo rm -rf registry sudo sealos build -t ${{ steps.prepare.outputs.cluster_image }}-arm64 --platform linux/arm64 -f Kubefile + sudo sealos build -t ${{ steps.prepare.outputs.latest_cluster_image }}-arm64 --platform linux/arm64 -f Kubefile - name: Manifest Cluster Images run: | - CLUSTER_IMAGE_NAME=${{ steps.prepare.outputs.cluster_image }} sudo sealos images - bash docker/patch/manifest-cluster-images.sh $CLUSTER_IMAGE_NAME + bash docker/patch/manifest-cluster-images.sh ${{ steps.prepare.outputs.cluster_image }} + bash docker/patch/manifest-cluster-images.sh ${{ steps.prepare.outputs.latest_cluster_image }} env: OWNER: ${{ github.repository_owner }} - - name: Renew issue and Sync Images + - name: Renew issue and Sync Images for ${{ steps.prepare.outputs.cluster_image }} uses: labring/gh-rebot@v0.0.6 if: ${{ github.repository_owner == env.DEFAULT_OWNER }} with: @@ -206,9 +208,24 @@ jobs: env: GH_TOKEN: "${{ secrets.GH_PAT }}" SEALOS_TYPE: "issue_renew" - SEALOS_ISSUE_TITLE: "[DaylyReport] Auto build for sealos" + 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-${{ env.MODULE_NAME }}-frontend:${{ steps.prepare.outputs.tag_name }}" + 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 + 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 ${{ steps.prepare.outputs.latest_cluster_image }}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2c5f7ef858e..0ae265f2524 100755 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,7 +68,7 @@ jobs: env: GH_TOKEN: "${{ secrets.GH_PAT }}" SEALOS_TYPE: "issue_renew" - SEALOS_ISSUE_TITLE: "[DaylyReport] Auto build for sealos" + SEALOS_ISSUE_TITLE: "【DaylyReport】 Auto build for sealos" SEALOS_ISSUE_BODYFILE: "scripts/ISSUE_RENEW.md" SEALOS_ISSUE_LABEL: "dayly-report" SEALOS_ISSUE_TYPE: "day" @@ -83,7 +83,7 @@ jobs: env: GH_TOKEN: "${{ secrets.GH_PAT }}" SEALOS_TYPE: "issue_renew" - SEALOS_ISSUE_TITLE: "[DaylyReport] Auto build for sealos" + SEALOS_ISSUE_TITLE: "【DaylyReport】 Auto build for sealos" SEALOS_ISSUE_BODYFILE: "scripts/ISSUE_RENEW.md" SEALOS_ISSUE_LABEL: "dayly-report" SEALOS_ISSUE_TYPE: "day" diff --git a/.github/workflows/services.yml b/.github/workflows/services.yml index 67b0016b4f8..61cdfd7ce74 100644 --- a/.github/workflows/services.yml +++ b/.github/workflows/services.yml @@ -232,6 +232,17 @@ jobs: env: OWNER: ${{ github.repository_owner }} + - name: Build ${{ matrix.module }}-service latest cluster image + 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 + 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 }} @@ -240,9 +251,24 @@ jobs: env: GH_TOKEN: "${{ secrets.GH_PAT }}" SEALOS_TYPE: "issue_renew" - SEALOS_ISSUE_TITLE: "[DaylyReport] Auto build for sealos" + 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:${{ 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"