This is an automated email from the ASF dual-hosted git repository. pcongiusti pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/main by this push: new 7040370ac fix(ci): use released action version 7040370ac is described below commit 7040370ac31717ad79f41e48d5ab381602f2d543 Author: Pasquale Congiusti <pasquale.congiu...@gmail.com> AuthorDate: Wed Jun 21 10:47:08 2023 +0200 fix(ci): use released action version Closes #4063 --- .github/actions/kamel-build-binary/build-binary.sh | 2 ++ .github/actions/kamel-config-cluster-kind/action.yml | 2 +- script/Makefile | 14 +++++++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/actions/kamel-build-binary/build-binary.sh b/.github/actions/kamel-build-binary/build-binary.sh index a1ca0fb81..f0d7ec5e1 100755 --- a/.github/actions/kamel-build-binary/build-binary.sh +++ b/.github/actions/kamel-build-binary/build-binary.sh @@ -98,6 +98,8 @@ fi echo "Moving kamel binary to be visible on PATH" if [ "$RUNNER_OS" == "macOS" ]; then + # We need to build the binary for the proper platform if we're not on Linux + make build ${SUDO} mv $(readlink kamel) /usr/local/bin/kamel else ${SUDO} mv $(readlink kamel) /usr/bin/kamel diff --git a/.github/actions/kamel-config-cluster-kind/action.yml b/.github/actions/kamel-config-cluster-kind/action.yml index c1f7f4831..f8ab0abff 100644 --- a/.github/actions/kamel-config-cluster-kind/action.yml +++ b/.github/actions/kamel-config-cluster-kind/action.yml @@ -23,7 +23,7 @@ runs: steps: - id: install-cluster name: Install Cluster - uses: container-tools/kind-action@61f1afd4807b0dac84f3232ec99e45c63701d220 + uses: container-tools/kind-action@v2.0.1 if: ${{ env.CLUSTER_KIND_CONFIGURED != 'true' }} with: version: v0.14.0 diff --git a/script/Makefile b/script/Makefile index bb14c8691..2f41df8dc 100644 --- a/script/Makefile +++ b/script/Makefile @@ -342,8 +342,8 @@ test-quarkus-native-high-memory: do-build go test -timeout 180m -v ./e2e/native -tags=integration,high_memory $(TEST_QUARKUS_RUN) $(GOTESTFMT) build-kamel: - @echo "####### Building kamel CLI for $(IMAGE_ARCH) architecture..." - CGO_ENABLED=0 GOOS=linux GOARCH=$(IMAGE_ARCH) go build $(GOFLAGS) -o build/_output/bin/kamel-$(IMAGE_ARCH) ./cmd/kamel/*.go + @echo "####### Building kamel CLI for $(GOOS) $(IMAGE_ARCH) architecture..." + CGO_ENABLED=0 GOARCH=$(IMAGE_ARCH) go build $(GOFLAGS) -o build/_output/bin/kamel-$(IMAGE_ARCH) ./cmd/kamel/*.go # Symbolic link to a local CLI ln -sf build/_output/bin/kamel-$(IMAGE_ARCH) ./kamel @@ -422,9 +422,17 @@ maven-overlay: ./script/maven_overlay.sh -s "$(STAGING_RUNTIME_REPO)" -d "$(CAMEL_K_RUNTIME_DIR)" $(RUNTIME_VERSION) build/_maven_overlay kamel-overlay: - @echo "####### Copy arch $(IMAGE_ARCH) CLI into output build directory..." + mkdir -p build/_output/bin +ifeq ($(shell uname -s 2>/dev/null || echo Unknown),Linux) + @echo "####### Copying Linux platform arch $(IMAGE_ARCH) CLI into output build directory..." +else + @echo "####### (Re)Building a Linux platform arch $(IMAGE_ARCH) CLI " + @echo "####### Likely you're on a non Linux host, so I need to build a Linux CLI to bundle in the container image" + GOOS=linux GOARCH=$(IMAGE_ARCH) go build $(GOFLAGS) -o build/_output/bin/kamel-$(IMAGE_ARCH) ./cmd/kamel/*.go +endif cp build/_output/bin/kamel-$(IMAGE_ARCH) build/_output/bin/kamel + images: build kamel-overlay maven-overlay bundle-kamelets ifneq (,$(findstring SNAPSHOT,$(RUNTIME_VERSION))) ./script/package_maven_artifacts.sh -s "$(STAGING_RUNTIME_REPO)" -d "$(CAMEL_K_RUNTIME_DIR)" $(RUNTIME_VERSION)