Closed stasadev closed 1 month ago
At DDEV we run linter before executing this action:
https://github.com/ddev/ddev.com/blob/7a849588830da831a94f356877abee6d08a458a9/.github/workflows/test.yml
jobs: build: timeout-minutes: 15 runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: 20 - name: Install dependencies run: npm ci - name: Lint run: npm run textlint - name: Install, build, and upload your site output uses: withastro/action@v2
And your action use find to check for pnpm-lock.yaml, yarn.lock, package-lock.json and bun.lockb without a specific depth, which resulted in:
find
pnpm-lock.yaml
yarn.lock
package-lock.json
bun.lockb
find "." -name "yarn.lock" ./node_modules/uri-js/yarn.lock
And our tests failed with (we use npm):
npm
Warning: No existing directories found containing cache-dependency-path="./yarn.lock"
Use -maxdepth 1 as it makes no sense to search all subdirectories for lockfiles.
-maxdepth 1
The Issue
At DDEV we run linter before executing this action:
https://github.com/ddev/ddev.com/blob/7a849588830da831a94f356877abee6d08a458a9/.github/workflows/test.yml
And your action use
find
to check forpnpm-lock.yaml
,yarn.lock
,package-lock.json
andbun.lockb
without a specific depth, which resulted in:And our tests failed with (we use
npm
):How This PR Solves The Issue
Use
-maxdepth 1
as it makes no sense to search all subdirectories for lockfiles.