-
Notifications
You must be signed in to change notification settings - Fork 176
113 lines (100 loc) · 4 KB
/
release-sync.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: RELEASE-SYNC
on:
workflow_dispatch:
inputs:
sync_flag:
description: 'sync flag (eg. sealos)'
required: false
default: ''
release:
types: [ released, prereleased ]
env:
CLI_REPO: 'apecloud/kbcli'
HELM_CHART_REPO: 'apecloud/helm-charts'
GITLAB_KBCLI_PROJECT_ID: 85948
GITLAB_ACCESS_TOKEN: ${{ secrets.GITLAB_ACCESS_TOKEN }}
jobs:
update-release-kbcli:
name: Update Release kbcli
runs-on: ubuntu-latest
outputs:
release-version: ${{ steps.get_latest_version.outputs.release_version }}
steps:
- uses: actions/checkout@v4
- name: update release ${{ env.CLI_NAME }} latest
id: get_latest_version
run: |
LATEST_RELEASE_TAG=`bash ${{ github.workspace }}/.github/utils/utils.sh \
--type 4 \
--github-token ${{ secrets.PERSONAL_ACCESS_TOKEN }}`
bash ${{ github.workspace }}/.github/utils/utils.sh \
--type 5 \
--tag-name $LATEST_RELEASE_TAG \
--github-repo ${{ env.CLI_REPO }} \
--github-token ${{ secrets.PERSONAL_ACCESS_TOKEN }}
HELM_CHART_LATEST_RELEASE_TAG="kubeblocks-${LATEST_RELEASE_TAG/v/}"
bash ${{ github.workspace }}/.github/utils/utils.sh \
--type 5 \
--tag-name $HELM_CHART_LATEST_RELEASE_TAG \
--github-repo ${{ env.HELM_CHART_REPO }} \
--github-token ${{ secrets.PERSONAL_ACCESS_TOKEN }}
bash ${{ github.workspace }}/.github/utils/release_gitlab.sh \
--type 4 \
--tag-name $LATEST_RELEASE_TAG \
--project-id ${{ env.GITLAB_KBCLI_PROJECT_ID }} \
--access-token ${{ env.GITLAB_ACCESS_TOKEN }}
echo release_version=$LATEST_RELEASE_TAG >> $GITHUB_OUTPUT
release-homebrew-tap:
needs: update-release-kbcli
uses: apecloud/apecloud-cd/.github/workflows/trigger-workflow.yml@v0.1.1
with:
GITHUB_REPO: "apecloud/homebrew-tap"
WORKFLOW_ID: "release.yml"
VERSION: "${{ needs.update-release-kbcli.outputs.release-version }}"
APECD_REF: "v0.1.1"
secrets: inherit
release-winget-kbcli:
needs: update-release-kbcli
if: github.event.action== 'released'
uses: apecloud/apecloud-cd/.github/workflows/trigger-workflow.yml@v0.1.1
with:
GITHUB_REPO: "apecloud/apecloud-cd"
WORKFLOW_ID: "publish-kbcli-winget.yml"
VERSION: "${{ needs.update-release-kbcli.outputs.release-version }}"
APECD_REF: "v0.1.1"
secrets: inherit
release-scoop-kbcli:
needs: update-release-kbcli
if: github.event.action== 'released'
uses: apecloud/apecloud-cd/.github/workflows/trigger-workflow.yml@v0.1.1
with:
GITHUB_REPO: "apecloud/apecloud-cd"
WORKFLOW_ID: "publish-kbcli-scoop.yml"
VERSION: "${{ needs.update-release-kbcli.outputs.release-version }}"
APECD_REF: "v0.1.1"
secrets: inherit
release-chocolatey-kbcli:
needs: update-release-kbcli
if: github.event.action== 'released'
uses: apecloud/apecloud-cd/.github/workflows/trigger-workflow.yml@v0.1.1
with:
GITHUB_REPO: "apecloud/apecloud-cd"
WORKFLOW_ID: "publish-kbcli-choco.yml"
VERSION: "${{ needs.update-release-kbcli.outputs.release-version }}"
APECD_REF: "v0.1.1"
secrets: inherit
release-sealos:
needs: update-release-kbcli
if: ${{ github.event.action== 'released' || inputs.sync_flag == 'sealos' }}
uses: apecloud/apecloud-cd/.github/workflows/comment-issue.yml@v0.1.16
strategy:
fail-fast: false
matrix:
app-name: [ "kubeblocks", "kubeblocks-apecloud-mysql", "kubeblocks-postgresql",
"kubeblocks-mongodb", "kubeblocks-redis", "kubeblocks-kafka" ]
with:
GITHUB_REPO: "${{ vars.SEALOS_ISSUE_REPO }}"
ISSUE_NUMBER: "${{ vars.SEALOS_ISSUE_NUMBER }}"
ISSUE_COMMENT_BODY: "/imagebuild_apps ${{ matrix.app-name }} ${{ needs.update-release-kbcli.outputs.release-version }}"
APECD_REF: "v0.1.16"
secrets: inherit