Skip to content

Commit ca97cbd

Browse files
authored
fix workflows build-and-push-wasm-plugin-image (#1508)
1 parent a787e23 commit ca97cbd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/build-and-push-wasm-plugin-image.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,19 @@ jobs:
4242
plugin_type="${{ github.event.inputs.plugin_type }}"
4343
plugin_name="${{ github.event.inputs.plugin_name }}"
4444
version="${{ github.event.inputs.version }}"
45-
builder_image="higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/wasm-rust-builder:rust${{ env.RUST_VERSION }}-oras${{ env.ORAS_VERSION }}"
4645
else
4746
ref_name=${{ github.ref_name }}
4847
plugin_type=${ref_name#*-} # 删除插件类型前面的字段(wasm-)
49-
plugin_type=${plugin_type%-*} # 删除插件类型后面的字段(-{plugin_name}-vX.Y.Z)
48+
plugin_type=${plugin_type%%-*} # 删除插件类型后面的字段(-{plugin_name}-vX.Y.Z)
5049
plugin_name=${ref_name#*-*-} # 删除插件名前面的字段(wasm-go-)
5150
plugin_name=${plugin_name%-*} # 删除插件名后面的字段(-vX.Y.Z)
5251
version=$(echo "$ref_name" | awk -F'v' '{print $2}')
52+
fi
53+
if [[ "$plugin_type" == "rust" ]]; then
54+
builder_image="higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/wasm-rust-builder:rust${{ env.RUST_VERSION }}-oras${{ env.ORAS_VERSION }}"
55+
else
5356
builder_image="higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/wasm-go-builder:go${{ env.GO_VERSION }}-tinygo${{ env.TINYGO_VERSION }}-oras${{ env.ORAS_VERSION }}"
5457
fi
55-
5658
echo "PLUGIN_TYPE=$plugin_type" >> $GITHUB_ENV
5759
echo "PLUGIN_NAME=$plugin_name" >> $GITHUB_ENV
5860
echo "VERSION=$version" >> $GITHUB_ENV

0 commit comments

Comments
 (0)