Closed dungpham91 closed 1 month ago
@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
.
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:
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.
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 https://github.com/actions/runner/issues/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: https://github.com/ibiqlik/action-yamllint/pull/34
If you have time, go through it and test on your test environment. Thanks.