Skip to content

Commit 5a67642

Browse files
committed
Fix: optimize local build display
Signed-off-by: harlee-x <[email protected]>
1 parent 73237c2 commit 5a67642

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

.github/workflows/ci-chart.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: Publish Chart
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
- release-*
84
release:
95
types:
106
- published

.github/workflows/ci-infra-build.yaml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
name: CI-Infra-Build
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
- release-*
8-
workflow_dispatch: {}
9-
pull_request:
10-
branches:
11-
- main
12-
- release-*
4+
release:
5+
types:
6+
- published
7+
tags:
8+
- v*
139

1410
permissions:
1511
contents: read
@@ -93,6 +89,13 @@ jobs:
9389
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
9490
with:
9591
submodules: true
92+
93+
- name: Get Version
94+
id: get_version
95+
run: |
96+
VERSION=${GITHUB_REF#refs/tags/}
97+
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
98+
9699
- name: Setup Go
97100
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
98101
with:
@@ -118,8 +121,9 @@ jobs:
118121

119122
- name: Run Build Images
120123
run: |
121-
make multi-arch-builder IMG_REGISTRY=${{ secrets.CONTAINER_REGISTRY }}
122-
make publish IMG_REGISTRY=${{ secrets.CONTAINER_REGISTRY }}
124+
version=${{ steps.get_version.outputs.VERSION }}
125+
make multi-arch-builder IMG_REGISTRY=${{ secrets.CONTAINER_REGISTRY }} VERSION=${version}
126+
make publish IMG_REGISTRY=${{ secrets.CONTAINER_REGISTRY }} VERSION=${version}
123127
124128
- name: Cleanup binary
125129
run: make kdp-cli-clean

makefiles/build-helm-package.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
HELM_CHART ?= kdp-infra
33
HELM_CHART_VERSION ?= $(VERSION)
44
KUBESPHERE_EXTENSION ?= helm
5-
KUBESPHERE_EXTENSION_VERSION ?= $(KUBESPHERE_EXTENSION_VERSION)
65

76
.PHONY: helm-package
87
helm-package: ## Helm package
@@ -11,7 +10,10 @@ helm-package: ## Helm package
1110

1211
.PHONY: kubesphere-helm-package
1312
kubesphere-helm-package: ## Kubesphere Helm package
13+
@echo $(VERSION)
14+
@sed -i.bak "s/1\.2\.0/$(VERSION)/g" ./helm/extension.yaml
1415
$(KSBUILDBIN) package $(KUBESPHERE_EXTENSION)
16+
mv ./helm/extension.yaml.bak ./helm/extension.yaml
1517

1618

1719
.PHONY: helm-doc

makefiles/build.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
##@ Docker image info
22
IMG ?= linktimecloud/kubernetes-data-platform:$(VERSION)
3-
KDP_IMG ?= linktimecloud/kdp-infra:$(VERSION)
3+
KDP_IMG ?= linktimecloud/kdp:$(VERSION)
44
IMG_REGISTRY ?= ""
55
OUTPUT_TYPE := registry
66
TARGETARCHS := amd64 arm64

0 commit comments

Comments
 (0)