I’d like to explain something I went through as I think the documentation could maybe specify this case a bit more or it could even be a bug (not sure though).
I have a repository with a rails app. The repository has its own action to run tests in a docker container. The workflow’s path would be /.github/workflows/main.yml while the action’s path would be /.github/actions/automatic-tests/action.yml.
The thing is, I tried following the documentation, where it says:
So, in the workflow’s main.yml I set:
However, when the action was triggered, I got the following error:
Can't find 'action.yml' or 'Dockerfile' under '/home/runner/work/hello_world_github_actions/hello_world_github_actions/.github/actions/automatic-tests@master'. Did you forget to run actions/checkout before running your local action?
I fond it weird that the repository name got duplicated in the path (…/hello_world_github_actions/hello_world_github_actions/…). I also tried setting it to ./…/.github to workaround this second hello_world_github_actions directory but it still failed, I believe it was because there is no reference to raquelhortab, which is my github account name.
I got it to work by setting the whole repository reference, as I would do if I wanted to use an action in another repository (with a previous checkout as well):
However, I’d like to know if this is the expected behaviour or whether I did something wrong.