${{ github.action_path }} makes no sense when action is run inside self-hosted custom container.
See original GitHub issueDescribe the bug ${{ github.action_path }} points to a location in the host filesystem of the github runner host. Not to /__w/_actions/…
To Reproduce Steps to reproduce the behavior:
- Create a custom container.
- Create a workflow that uses the custom docker container on a self-hosted runner.
- Try to follow the guide for the new composite actions that requires to use ${{ github.action_path }}, for example to locate a shell script of a composite action.
Expected behavior The shell script is found and executed, just like when doing this with a normal ubuntu-latest runner.
Runner Version and Platform
v2.273.4 on Linux.
OS of the machine running the runner? OSX/Windows/Linux/… Linux.
What’s not working?
(...)
##[error]Process completed with exit code 127.
Run pylot-tech/actions_checkout@v1
/__w/_temp/615e5631-1155-478e-93e8-8e5cc51fb88e.sh: line 1: /home/github-runner/actions-runner-new/_work/_actions/pylot-tech/actions_checkout/v1/clone.sh: No such file or directory
Issue Analytics
- State:
- Created 3 years ago
- Reactions:17
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Run the job.container as the same user of the host VM by ...
Description Run the containers as the same user running on the host (the ... github.action_path }} makes no sense when action is run...
Read more >github.action_path contains wrong path when used inside ...
When using ${{ github.action_path }} inside a local composite action and calling this action in a job that runs inside a container, ...
Read more >Customizing the containers used by jobs
GitHub Actions supports commands that let you customize the way your containers are created by the self-hosted runner. For example, you can use...
Read more >Workflow syntax for GitHub Actions
A workflow with the following path filter will only run on push events that include at least one file outside the docs directory...
Read more >Contexts - GitHub Docs
Contexts are a way to access information about workflow runs, variables, runner environments, jobs, and steps. Each context is an object that contains ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
seems like env variable GITHUB_ACTION_PATH set to correct path. so step could be called via GITHUB_ACTION_PATH instead of ${{ github.action_path }}
Hi! I’m still encountering this issue in the following case:
foo
in a (private) repositoryA
. The action is defined using two files -foo/action.yml
andfoo/my_script.sh
;action.yml
references the script like so:run: ${{ github.action_path }}/my_script.sh
B
that does the following:A
usingactions/checkout
to a local folderuses: ./my_local_folder/foo
<...> No such file or directory <...>
error as mentioned in the issue’s descriptionUsing
${GITHUB_ACTION_PATH}
instead of${{ github.action_path }}
does help by the way, but I guess the two placeholders should behave the same way? 😁