Skip to content

Glob markdown files on github action only returns docs folder #25619

Discussion options

You must be logged in to vote

It seems the bash in github actions has different defaults like your system,
You might need to add shopt -s globstar to your script before ls ./**/*.md to enable the globstar.
E.g.

      - name: 'Spellchecking Content'
        run: |
          shopt -s globstar
          npm install cspell -g
          pwd
          ls ./**/*.md
          npx cspell $(ls ./**/*.md) -c ${{ github.workspace }}/cspell.json
        working-directory: ${{ github.workspace }}

See here for more information:

<a href="https://github.community/t/path-patterns-not-working/198474/4">Path patterns not working</a> <a class="badge-wrapper  bullet" href="/c/code-to-cloud/github-actions/41"><span class="badge-category-…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants