actionsx/prettier

Action fails with message "[error] No files matching the pattern were found"

Closed this issue · 4 comments

For example: https://github.com/ClassChats/ClassChats/pull/10/checks?check_run_id=1042505214

When I run the command locally it works fine, and the files definitely exist.

It looks like you didn't check out your repository. You have to run actions/checkout first, the following are suggested workflow based on yours:

# This workflow will check that PRs use the correct style.

name: Style Check
on: pull_request

jobs:
  prettier:
    name: Prettier
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actionsx/prettier@v2
        with:
          # prettier CLI arguments.
          args: --check "src/**/*.ts"

That fixed it, thanks! Could you possibly add it to the README? And is this documented anywhere officially?

That fixed it, thanks! Could you possibly add it to the README? And is this documented anywhere officially?

It wasn't documented, as I assumed people always check out before running this. However, your use case showed that my assumption was wrong. Could you help create an issue describe how you want to see it documented?

Sure.