Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release ci #27

Merged
merged 4 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/cloud-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release Cloud

on:
release:
types: [ published ]

env:
# Common versions
GO_VERSION: "1.20"
DEFAULT_OWNER: "labring"
TAG: ${{ github.event.release.tag_name }}

jobs:
save-sealos:
uses: ./.github/workflows/import-save-sealos.yml

release-controllers:
needs:
- save-sealos
uses: ./.github/workflows/controllers.yml
with:
push_image: true
push_image_tag: ${{ env.TAG }}

release-frontends:
needs:
- save-sealos
uses: ./.github/workflows/frontend.yml
with:
push_image: true
push_image_tag: ${{ env.TAG }}

release-service:
needs:
- save-sealos
uses: ./.github/workflows/services.yml
with:
push_image: true
push_image_tag: ${{ env.TAG }}

release-cloud:
needs:
- save-sealos
- release-controllers
- release-frontends
- release-service
uses: ./.github/workflows/cloud.yml
with:
push_image: true
push_image_tag: ${{ env.TAG }}
build_from: ${{ env.TAG }}
19 changes: 17 additions & 2 deletions .github/workflows/cloud.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
name: Build Cloud Cluster image

on:
release:
types: [ published ]
workflow_run:
workflows: [ "Build Controllers image", "Build Frontend Image" ]
types:
- completed
workflow_call:
inputs:
push_image:
description: 'Push image'
required: false
type: boolean
default: false
push_image_tag:
description: 'Push all-in-one image tag, default is latest'
default: 'latest'
required: false
type: string
build_from:
description: 'Build all-in-one image from components image tag, default is latest'
default: 'latest'
required: false
type: string
workflow_dispatch:
inputs:
push_image:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/controllers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ name: Build Controllers 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
type: string
workflow_dispatch:
inputs:
push_image:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ 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
type: string
workflow_dispatch:
inputs:
push_image:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ name: Build Services 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
type: string
workflow_dispatch:
inputs:
push_image:
Expand Down