mirror of
https://github.com/alibaba/higress.git
synced 2026-06-26 02:35:02 +08:00
fix: Fix some bugs in build-and-push-wasm-plugin-image.yaml (#1107)
This commit is contained in:
@@ -16,7 +16,7 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push-image:
|
build-and-push-wasm-plugin-image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
environment:
|
environment:
|
||||||
name: image-registry-msg
|
name: image-registry-msg
|
||||||
@@ -84,18 +84,20 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Image and Push
|
- name: Build Image and Push
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
push_command=${{ env.PUSH_COMMAND }}
|
push_command=${{ env.PUSH_COMMAND }}
|
||||||
push_command=${push_command#\"}
|
push_command=${push_command#\"}
|
||||||
push_command=${push_command%\"} # 删除PUSH_COMMAND中的双引号,确保oras push正常解析
|
push_command=${push_command%\"} # 删除PUSH_COMMAND中的双引号,确保oras push正常解析
|
||||||
|
|
||||||
|
target_image="${{ env.IMAGE_REGISTRY_SERVICE }}/${{ env.IMAGE_REPOSITORY}}:${{ env.VERSION }}"
|
||||||
|
echo "TargetImage=${target_image}"
|
||||||
|
|
||||||
command="
|
command="
|
||||||
cd /workspace/plugins/wasm-go/extensions/${PLUGIN_NAME}
|
cd /workspace/plugins/wasm-go/extensions/${PLUGIN_NAME}
|
||||||
go mod tidy
|
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
|
tar czvf plugin.tar.gz plugin.wasm
|
||||||
echo ${{ secrets.REGISTRY_PASSWORD }} | oras login -u ${{ secrets.REGISTRY_USERNAME }} --password-stdin ${{ env.IMAGE_REGISTRY_SERVICE }}
|
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"
|
docker exec builder bash -c "$command"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user