Skip to content

Commit

Permalink
Release ci (#29)
Browse files Browse the repository at this point in the history
* add cloud release ci.

Signed-off-by: yy <[email protected]>

* fix

Signed-off-by: yy <[email protected]>

* add workflow_call.

Signed-off-by: yy <[email protected]>

* fix secret.

Signed-off-by: yy <[email protected]>

---------

Signed-off-by: yy <[email protected]>
  • Loading branch information
lingdie authored Nov 6, 2023
1 parent 98dbeb4 commit 61e5042
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 2 deletions.
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:
uses: ./.github/workflows/controllers.yml
with:
push_image: true
push_image_tag: ${{ env.TAG }}
secrets: inherit

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

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

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 }}
secrets: inherit
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

0 comments on commit 61e5042

Please sign in to comment.