ibiqlik / action-yamllint

GitHub Action - Yaml Lint
MIT License
96 stars 41 forks source link

self-hosted runner entrypoint.sh: No such file or directory #35

Closed dungpham91 closed 1 month ago

dungpham91 commented 2 years ago

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.

image

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.

image

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 ):

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.

ibiqlik commented 2 years 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

dungpham91 commented 2 years ago

Yep, feel free to test my PR and try it on your test environment.

mihai-sysbio commented 1 year ago

I can confirm this is still an issue in 3.1.1.