mirror of
https://github.com/yanhao98/composite-actions.git
synced 2025-07-13 14:50:48 +08:00
新增 pnpm-lock.yaml 文件,并在 action.yml 中更新 pnpm 检测逻辑以输出锁文件存在状态
All checks were successful
/ another-job (push) Successful in 18s
All checks were successful
/ another-job (push) Successful in 18s
This commit is contained in:
9
pnpm-lock.yaml
generated
Normal file
9
pnpm-lock.yaml
generated
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
lockfileVersion: '9.0'
|
||||||
|
|
||||||
|
settings:
|
||||||
|
autoInstallPeers: true
|
||||||
|
excludeLinksFromLockfile: false
|
||||||
|
|
||||||
|
importers:
|
||||||
|
|
||||||
|
.: {}
|
@ -30,7 +30,7 @@ runs:
|
|||||||
packageManager=$(jq -r '.packageManager' package.json)
|
packageManager=$(jq -r '.packageManager' package.json)
|
||||||
echo "packageManager: $packageManager"
|
echo "packageManager: $packageManager"
|
||||||
if [[ "$packageManager" == "pnpm"* ]]; then
|
if [[ "$packageManager" == "pnpm"* ]]; then
|
||||||
echo "pnpm detected: $packageManager"
|
echo "setup-pnpm=true"
|
||||||
echo "setup-pnpm=true" >> $GITHUB_OUTPUT
|
echo "setup-pnpm=true" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -38,6 +38,8 @@ runs:
|
|||||||
if [[ -f "pnpm-lock.yaml" ]]; then
|
if [[ -f "pnpm-lock.yaml" ]]; then
|
||||||
echo "pnpm-lock.yaml exists"
|
echo "pnpm-lock.yaml exists"
|
||||||
echo "pnpm-lock-exists=true" >> $GITHUB_OUTPUT
|
echo "pnpm-lock-exists=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "pnpm-lock.yaml does not exist"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v4 # https://github.com/pnpm/action-setup?tab=readme-ov-file#inputs
|
- uses: pnpm/action-setup@v4 # https://github.com/pnpm/action-setup?tab=readme-ov-file#inputs
|
||||||
|
Reference in New Issue
Block a user