Skip to content

Commit e091d1c

Browse files
ci: fix corepack key id mismatch (#9153)
* ci: fix corepack key id mismatch * fix: pnpm * fix: pnpm * chore: echo * fix: pin * fix: try remove --force * Revert "fix: try remove --force" This reverts commit ac809f4. * fix: try uninstall * fix: ci * fix: do not use corepack * Revert "fix: do not use corepack" This reverts commit e9024ac. * fix: try another * Revert "fix: try another" This reverts commit 4f71800. * fix: location * fix: windows corepack not work * ci: remove unused code --------- Co-authored-by: jerrykingxyz <[email protected]>
1 parent 22d3a1c commit e091d1c

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.github/actions/docker-build/action.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@ runs:
4242
${{ inputs.pre }}
4343
rustup target add ${{ inputs.target }}
4444
45-
# corepack > 0.24.1 will use native fetch
46-
# and native fetch not support HTTP_PROXY
47-
# https://github.com/nodejs/undici/issues/1650
48-
npm install -g [email protected]
45+
npm install -g [email protected] --force
46+
echo "Corepack version: $(corepack --version)"
4947
corepack enable
5048
5149
RUST_TARGET=${{ inputs.target }} pnpm build:binding:${{ inputs.profile }}

.github/actions/pnpm-cache/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ runs:
2828
if: ${{ inputs.node-version != '16' }}
2929
shell: bash
3030
run: |
31+
if [[ "${{runner.os}}" == "Windows" ]]; then
32+
# add the npm prefix to PATH to ensure the installed corepack work properly
33+
NPM_PREFIX=$(cygpath -u "$(npm config get prefix)")
34+
export PATH="$NPM_PREFIX:$PATH"
35+
fi
36+
npm install -g [email protected] --force
37+
echo "Corepack version: $(corepack --version)"
3138
corepack enable
3239
3340
# https://pnpm.io/continuous-integration#github-actions

0 commit comments

Comments
 (0)