dorny / paths-filter

Conditionally run actions based on files modified by PR, feature branch or pushed commits
MIT License
2.14k stars 239 forks source link

Pull request reference make the action to fail #117

Open mkujbus opened 2 years ago

mkujbus commented 2 years ago

If I manually trigger the action with a workflow dispatch event (input is a pull request id), and set the ref to a pull request id, the action fails.

    steps:
      - uses: actions/checkout@v2
        with:
          ref: master
      - uses: dorny/paths-filter@v2
        id: filter
        with:
          ref: pull/${{ github.event.inputs.pull_request_id }}/head
          base: 'master'
          filters: |
               ...

The error message is: Error: Could not determine what is pull/810/head - fetch works but it's not a branch, tag or commit SHA

image

Setting a ref with this style is supported by native github actions, like the checkout version2. I would like to trigger the workflow based on PR links, hence the use case.