action-download-artifact icon indicating copy to clipboard operation
action-download-artifact copied to clipboard

Error: no matching workflow run found

Open dinesh-bisht opened this issue 2 years ago • 3 comments

Hi, I have two WorkFlows: Workflow-1 runs only when PR is Opened and below the condition. In this workflow I am creating and then uploading the artifact. on: pull_request: branches: - master types: [opened]

Workflow-2 runs only when PR is Closed. In this workflow I want to dowload artifact which is uploaded by Workflow-1.

Things are working fine when I commit the changes to work branch, PR is created and then closed.

The problem arises when after creating a Pull Request, I make additonal change to branch and commit it. So now in Pull request there are two commit id. Workflow-1 ran with the first commit id but when Workflow-2 runs and then code tries to download the artifact with the second commit-id.

Is it possible to download the artifact by ONLY PR number and WORKFLOW name?

dinesh-bisht avatar Mar 09 '22 14:03 dinesh-bisht

Try setting search_artifacts input. If that won't work then I don't think I know any other solution.

dawidd6 avatar Mar 09 '22 15:03 dawidd6

I tried search_artifacts to true, it did not work. I also tried below options as well: name: myartifact check_artifacts: true search_artifacts: true

In the log I see the commit id of the second commit and not commit which initiated the Workflow#1.

Run dawidd6/action-download-artifact@v2
==> Workflow: onpullrequestopen.yml
==> Repo: dineshsinghbisht/githubartifacts
==> Conclusion: success
==> PR: [13](https://github.com/dineshsinghbisht/githubartifacts/runs/5482595031?check_suite_focus=true#step:4:13)
==> Commit: baf1919aef4e8a5073c7e951c7e75b97bb756431

dineshsinghbisht avatar Mar 09 '22 15:03 dineshsinghbisht

Then you need to find a way to somehow pass the commit hash to the action.

dawidd6 avatar Mar 09 '22 17:03 dawidd6