codespell-project / actions-codespell

MIT License
75 stars 19 forks source link

ignore_words_file does not work #21

Closed knrt10 closed 4 years ago

knrt10 commented 4 years ago

Steps to reproduce

Use the following action

codespell:
    name: Codespell
    runs-on: ubuntu-latest
    timeout-minutes: 5
    steps:

      - name: Codespell test
        uses: codespell-project/actions-codespell@master
        with:
          skip: vendor, ./lokoctl, *.png, assets/charts/components/*, docs/images/*
          ignore_words_file: './.codespell.ignorewords'
          check_filenames: true
          check_hidden: true

Expected Behaviour

It should find the file

Actual Behaviour

It says Error: ERROR: cannot find ignore-words file: ./.codespell.ignorewords

The file crearly exists at base path. I even tried using relative path. Can you please tell if I am doing anything wrong?

For more information https://github.com/knrt10/lokomotive/runs/1252079699?check_suite_focus=true

per1234 commented 4 years ago

In order to make the files of your repository accessible to the workflow, you need to add a step to your workflow using the actions/checkout action:

- uses: actions/checkout@v2
knrt10 commented 4 years ago

It worked, thank you for your help

peternewman commented 4 years ago

Thanks @per1234

@knrt10 in future you can just copy the workflow from the parent codespell repo: https://github.com/codespell-project/codespell/blob/master/.github/workflows/codespell.yml