checkout: Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/data/workflow_dir/_actions/actions/checkout/v2.4.0'.
Hi,
For some reason since yesterday, whenever Github Action ran, they’ll failed on the first attempt, but will always succeed on the second attempt.
The error message:
Error: Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/data/workflow_dir/_actions/actions/checkout/v2.4.0'. Did you forget to run actions/checkout before running your local action?
Would be lovely if anyone can help, thanks! 😃


About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 39
- Comments: 15
Commits related to this issue
- #50 再度チェックアウトする https://github.com/actions/checkout/issues/692 — committed to kuno1/ga-communicator by fumikito 3 years ago
- chore: workaround https://github.com/actions/checkout/issues/692#issuecomment-1515198382 — committed to willianantunes/reusable-workflows by willianantunes 3 years ago
- chore: workaround https://github.com/actions/checkout/issues/692#issuecomment-1515198382 — committed to willianantunes/reusable-workflows by willianantunes 3 years ago
- chore: workaround https://github.com/actions/checkout/issues/692#issuecomment-1515198382 — committed to willianantunes/reusable-workflows by willianantunes 3 years ago
- chore: workaround https://github.com/actions/checkout/issues/692#issuecomment-1515198382 — committed to willianantunes/reusable-workflows by willianantunes 3 years ago
- chore: workaround https://github.com/actions/checkout/issues/692#issuecomment-1515198382 — committed to willianantunes/reusable-workflows by willianantunes 3 years ago
- https://github.com/actions/checkout/issues/692 calling a workflow instead of an action Testfile dem Projekt hinzugefügt mit der Eigenschaft: Copy — committed to strange-corner/CircularBidirectionalFilereaderBuffer by deleted user 3 years ago
- :construction_worker: checkout to util repository https://github.com/actions/checkout/issues/692 — committed to paochanz/UnityUtilities by paochanz 3 years ago
- Fix action scope to original package at end of action At the end of the GitHub Action, checkout the original package to return the scope to enable subsequent actions. Prior to this change, the Post ... — committed to msayson/smithy-gh-pages-action by msayson 2 years ago
- ci: improve robustness of the "changes list" reusable workflow (#720) Add a workaround to make it work when the workflow is called from another repository. ### Notes Workaround found in http... — committed to bonitasoft/bonita-documentation-site by benjaminParisel 2 years ago
- Move up to job rather than step. (see https://github.com/actions/checkout/issues/692) — committed to rpy2/rpy2 by lgautier 2 years ago
- Seems to be a bug in GHA when using a composite action from the same repo after checking out code. Avoid it by running this composite action first. https://github.com/actions/checkout/issues/692 — committed to johnbillion/plugin-infrastructure by johnbillion 2 years ago
- Seems to be a bug in GHA when using a composite action from the same repo after checking out code. Avoid it by running this composite action first. https://github.com/actions/checkout/issues/692 — committed to Takadev4142/plugin-infrastructure by Takadev4142 2 years ago
You are confusing workflows with actions, if you define
Was having the same problem. Looks like it only currently supports it as a whole job rather than in a step. https://github.community/t/actions-reusable-workflow-failing-to-find-action-yml-that-does-exist/231258/3
Talking out my problem gave me some inspiration. Finally a breakthrough. So I just added this to the end of my action
# Checkout the repo - uses: actions/checkout@v3 with: # Repository name with owner. For example, actions/checkout Default: ${{ github.repository }}So Post Run needs to get connected back with this running actions repo and not whatever repo you connect to perform some external operation. Silly I need to remind the Action what its repo is, (by rechecking out to “this” or “local scope”) but whatever, I got it and hope it helps someone.Any word on this. Lots of people including me are seeing this on post run. My issue stems from what I believe is I connect via checkout@v2 or v3 to a different repo then the action is running under and if I remove the blocks for that everything works so some wires get crossed when you are on a repo in the main action that kicks off the workflow but then inside that workflow you use a different repo and wires get crossed on Post Run, but everything worked in run. Weird: Can’t find ‘action.yml’, ‘action.yaml’ or ‘Dockerfile’ Its such a dumb error cause if the action wasnt there it could have never run. Like how the heck CANT a post run find an action that the main run just executed from…
I wish GitHub would keep topics from being deleted (I’m trying to set up my CI and already ran into a handful of dead community links), thankfully the Internet Archive has a copy https://web.archive.org/web/20220427182405/https://github.community/t/actions-reusable-workflow-failing-to-find-action-yml-that-does-exist/231258/3
@maitrungduc1410 and @homeaidepi THANK YOU for your comments–this worked for me!!!
To reiterate for future readers deep in the rabbit of debugging: in the context of calling a local action (“local” meaning in the same repo as the workflow calling the action, and “action” meaning a composite action, which is different from a reusable workflow), if that action checks out other repos, the runner fails to clean up the original workspace that triggered the workflow. That’s because during clean-up, the runner’s in the repo the action checked out, so it can no longer find the action file. A workaround to this is to check out the original repo again so that now the runner can clean up the local action.
Failed run: Notice how the action and post-action `Update Zephyrus’ succeeded; it’s the original job clean up that failed.
Successful run:
Hi, I have another solution don’t need re-checkout origin source using
pathofcheckout@v3action andworking-directorykeyword for run steps.for ex:
Hope it helps you guys!.
it took me hours of to figure out this, thanks @homeaidepi for pointing it out.
In my case I have my composite action, inside the action I checkout to another repo. And it keeps on showing Post Run failed for the action. Then I realized that I need to checkout again to my main repo again (origin repo, where workflow triggered)
For us, the solution was found here https://github.com/orgs/community/discussions/26245#discussioncomment-5962450
multi-checkout-action
checkout@v2 should be the first one
I also encountered the same problem, how to solve it?