Skip to content

Commit

Permalink
fix(gh): pm detection
Browse files Browse the repository at this point in the history
  • Loading branch information
iammursal committed Mar 2, 2024
1 parent ae84e9d commit b164e6e
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v3
id: pnpm-install
with:
version: 8
run_install: false
- name: Detect package manager
id: detect-package-manager
run: |
Expand All @@ -45,16 +39,11 @@ jobs:
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=yarn" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/package.lock" ]; then
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/pnpm-lock.yaml" ]; then
echo "manager=pnpm" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=pnpm" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
Expand Down

0 comments on commit b164e6e

Please sign in to comment.