Skip to content

Commit

Permalink
fix workflows build-and-push-wasm-plugin-image (#1508)
Browse files Browse the repository at this point in the history
  • Loading branch information
007gzs authored Nov 13, 2024
1 parent a787e23 commit ca97cbd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build-and-push-wasm-plugin-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,19 @@ jobs:
plugin_type="${{ github.event.inputs.plugin_type }}"
plugin_name="${{ github.event.inputs.plugin_name }}"
version="${{ github.event.inputs.version }}"
builder_image="higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/wasm-rust-builder:rust${{ env.RUST_VERSION }}-oras${{ env.ORAS_VERSION }}"
else
ref_name=${{ github.ref_name }}
plugin_type=${ref_name#*-} # åˆ é™¤ę’ä»¶ē±»åž‹å‰é¢ēš„å­—ę®µ(wasm-)
plugin_type=${plugin_type%-*} # åˆ é™¤ę’ä»¶ē±»åž‹åŽé¢ēš„å­—ę®µ(-{plugin_name}-vX.Y.Z)
plugin_type=${plugin_type%%-*} # åˆ é™¤ę’ä»¶ē±»åž‹åŽé¢ēš„å­—ę®µ(-{plugin_name}-vX.Y.Z)
plugin_name=${ref_name#*-*-} # åˆ é™¤ę’ä»¶åå‰é¢ēš„å­—ę®µ(wasm-go-)
plugin_name=${plugin_name%-*} # åˆ é™¤ę’ä»¶ååŽé¢ēš„å­—ę®µ(-vX.Y.Z)
version=$(echo "$ref_name" | awk -F'v' '{print $2}')
fi
if [[ "$plugin_type" == "rust" ]]; then
builder_image="higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/wasm-rust-builder:rust${{ env.RUST_VERSION }}-oras${{ env.ORAS_VERSION }}"
else
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 }}"
fi
echo "PLUGIN_TYPE=$plugin_type" >> $GITHUB_ENV
echo "PLUGIN_NAME=$plugin_name" >> $GITHUB_ENV
echo "VERSION=$version" >> $GITHUB_ENV
Expand Down

0 comments on commit ca97cbd

Please sign in to comment.