diff --git a/.github/actions/docker-build/action.yml b/.github/actions/docker-build/action.yml index 29dc0e014695..68adff6b4620 100644 --- a/.github/actions/docker-build/action.yml +++ b/.github/actions/docker-build/action.yml @@ -42,10 +42,8 @@ runs: ${{ inputs.pre }} rustup target add ${{ inputs.target }} - # corepack > 0.24.1 will use native fetch - # and native fetch not support HTTP_PROXY - # https://github.com/nodejs/undici/issues/1650 - npm install -g corepack@0.24.1 + npm install -g corepack@0.31.0 --force + echo "Corepack version: $(corepack --version)" corepack enable RUST_TARGET=${{ inputs.target }} pnpm build:binding:${{ inputs.profile }} diff --git a/.github/actions/pnpm-cache/action.yml b/.github/actions/pnpm-cache/action.yml index 633d6b8ff2b7..6741740a3531 100644 --- a/.github/actions/pnpm-cache/action.yml +++ b/.github/actions/pnpm-cache/action.yml @@ -28,6 +28,13 @@ runs: if: ${{ inputs.node-version != '16' }} shell: bash run: | + if [[ "${{runner.os}}" == "Windows" ]]; then + # add the npm prefix to PATH to ensure the installed corepack work properly + NPM_PREFIX=$(cygpath -u "$(npm config get prefix)") + export PATH="$NPM_PREFIX:$PATH" + fi + npm install -g corepack@0.31.0 --force + echo "Corepack version: $(corepack --version)" corepack enable # https://pnpm.io/continuous-integration#github-actions