From 7c749b864c5079220a778e865a7d3928bcb9faa3 Mon Sep 17 00:00:00 2001 From: Kent Dong Date: Wed, 10 Jul 2024 13:41:58 +0800 Subject: [PATCH] fix: Fix some bugs in build-and-push-wasm-plugin-image.yaml (#1107) --- .../workflows/build-and-push-wasm-plugin-image.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-push-wasm-plugin-image.yaml b/.github/workflows/build-and-push-wasm-plugin-image.yaml index 7f480c3ac..aad822393 100644 --- a/.github/workflows/build-and-push-wasm-plugin-image.yaml +++ b/.github/workflows/build-and-push-wasm-plugin-image.yaml @@ -16,7 +16,7 @@ on: type: string jobs: - build-and-push-image: + build-and-push-wasm-plugin-image: runs-on: ubuntu-latest environment: name: image-registry-msg @@ -84,18 +84,20 @@ jobs: - name: Build Image and Push run: | - push_command=${{ env.PUSH_COMMAND }} push_command=${push_command#\"} push_command=${push_command%\"} # 删除PUSH_COMMAND中的双引号,确保oras push正常解析 + + target_image="${{ env.IMAGE_REGISTRY_SERVICE }}/${{ env.IMAGE_REPOSITORY}}:${{ env.VERSION }}" + echo "TargetImage=${target_image}" command=" cd /workspace/plugins/wasm-go/extensions/${PLUGIN_NAME} go mod tidy - tinygo build -o ./plugin.wasm -scheduler=none -target=wasi -gc=custom -tags='custommalloc nottinygc_finalizer' ./main.go + tinygo build -o ./plugin.wasm -scheduler=none -target=wasi -gc=custom -tags='custommalloc nottinygc_finalizer' . 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 ${IMAGE_REGISTRY_SERVICE}/${IMAGE_REPOSITORY}:${VERSION} ${push_command} + oras push ${target_image} ${push_command} " docker exec builder bash -c "$command"