Skip to content

Commit

Permalink
build(main): add ci for latest (#3514)
Browse files Browse the repository at this point in the history
Signed-off-by: cuisongliu <cuisongliu@qq.com>
  • Loading branch information
cuisongliu committed Jul 16, 2023
1 parent 4984d42 commit 4d4f7bb
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 13 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/ci-patch-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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=latest
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 }}
Expand All @@ -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"
30 changes: 22 additions & 8 deletions .github/workflows/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,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 }}
Expand All @@ -245,3 +245,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"

0 comments on commit 4d4f7bb

Please sign in to comment.