From df20472f7b8ba6aec2054e1e71d134111b66cc36 Mon Sep 17 00:00:00 2001 From: xingpiaoliang Date: Thu, 21 Aug 2025 09:47:30 +0800 Subject: [PATCH] fix(wasm-go-build): correct the build command (#2799) --- .github/workflows/build-and-push-wasm-plugin-image.yaml | 2 +- plugins/wasm-go/Dockerfile | 2 +- plugins/wasm-go/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-push-wasm-plugin-image.yaml b/.github/workflows/build-and-push-wasm-plugin-image.yaml index 77281002d..b75ed1a1f 100644 --- a/.github/workflows/build-and-push-wasm-plugin-image.yaml +++ b/.github/workflows/build-and-push-wasm-plugin-image.yaml @@ -122,7 +122,7 @@ jobs: set -e cd /workspace/plugins/wasm-go/extensions/${PLUGIN_NAME} go mod tidy - GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o plugin.wasm main.go + GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o plugin.wasm . tar czvf plugin.tar.gz plugin.wasm echo ${{ secrets.REGISTRY_PASSWORD }} | oras login -u ${{ secrets.REGISTRY_USERNAME }} --password-stdin ${{ env.IMAGE_REGISTRY_SERVICE }} oras push ${target_image} ${push_command} diff --git a/plugins/wasm-go/Dockerfile b/plugins/wasm-go/Dockerfile index 45588496e..d7fd78902 100644 --- a/plugins/wasm-go/Dockerfile +++ b/plugins/wasm-go/Dockerfile @@ -15,7 +15,7 @@ WORKDIR /workspace/extensions/$PLUGIN_NAME RUN go mod tidy RUN \ - GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o /main.wasm ./ + GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o /main.wasm . FROM scratch AS output diff --git a/plugins/wasm-go/Makefile b/plugins/wasm-go/Makefile index 15afc40dd..3f7c89cd5 100644 --- a/plugins/wasm-go/Makefile +++ b/plugins/wasm-go/Makefile @@ -60,7 +60,7 @@ builder: @echo "image: ${BUILDER}" local-build: - cd extensions/${PLUGIN_NAME};GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o ./main.wasm ./ + cd extensions/${PLUGIN_NAME};GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o ./main.wasm . @echo "" @echo "wasm: extensions/${PLUGIN_NAME}/main.wasm"