self-hosted runner entrypoint.sh: No such file or directory
Closed this issue · 3 comments
Hi,
Environment
I use actions on a self-hosted runner environment with containers on an EKS cluster environment.
The error
I encountered the following error:
/__w/_temp/50d0d2e6-824d-4c0b-af54-03b73e83c507.sh: line 2: /runner/_work/_actions/ibiqlik/action-yamllint/v3/entrypoint.sh: No such file or directory
Error: Process completed with exit code 127.
Description of the error
Before that, I ran actions with Github runner Ubuntu-latest and it was fine. However, when running the same workflows on a self-hosted environment with the container, an error will be encountered.
After some investigation and comparison between the two environments, I discovered something different about the action path when the runner uses it.
- Github runner with ubuntu-latest image:
- Self-hosted runner with ubuntu:latest image:
I tried investigating and found that file entrypoint.sh
is located in the path /__w/_actions/ibiqlik/action-yamllint/v3/entrypoint.sh
instead of /runner/_work/_actions/ibiqlik/action-yamllint/v3/entrypoint.sh
as image above.
Error Cause
After researching, I learned that the cause of the file's path is so wrong because the values of the following two variables are different (it was used in file action.yml ):
github.action_path
: return the value/runner/_work/_actions/ibiqlik/action-yamllint/v3/entrypoint.sh
with default path is/runner/_work/_actions/
.GITHUB_ACTION_PATH
: return the value/__w/_actions/ibiqlik/action-yamllint/v3/entrypoint.sh
with default path is/__w/_actions/
.
This bug has been identified on Github Runner actions/runner#716.
Solution
I created a PR about this bug and also added content to the README.md
for instructions on using the self-hosted runner environment.
PR link: #34
If you have time, go through it and test on your test environment. Thanks.
@dungpham91 that is interesting, I have to admit I have not ran the action from a self-hosted runner. The question is if it is a better idea to move the content of the script as inline script in the aciton.yml file 🤔 ? I'll take a look at your PR
Yep, feel free to test my PR and try it on your test environment.
I can confirm this is still an issue in 3.1.1
.