Failing composite action verbatim from docs #24985
-
I just tried to create a composite action, using verbatim the code from the documentation, but I get two different error messages under windows and ubuntu runners: Windows runner:
Ubuntu runner:
I know the action is accessed and it executes, because it prints “Hello Mona the Octocat.” on both, as per this part of the action:
This is the code that is using the action:
What am I missing ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
UPDATE: made it work on “ubuntu-latest” by adding the “chmod +x goodbye.sh” to the action itself like this (ALTHOUGH, in the documentation it is not described that way):
However on “windows-latest”, the “cd ${{ github.action_path }}” returns and error that there is no such a directory:
UPDATE 2: made it work on “windows-latest” as well. Turns out that “windows-latest” doesn’t work with ${{ github.action_path }}, so instead I used $GITHUB_ACTION_PATH, which apparently fixes the issue:
|
Beta Was this translation helpful? Give feedback.
-
I tried adding chmod to the same line but got this error After splitting into two steps, it worked.
I believe the documentation should be updated to say that chmod is needed even in the action itself before running the shell script. |
Beta Was this translation helpful? Give feedback.
UPDATE:
made it work on “ubuntu-latest” by adding the “chmod +x goodbye.sh” to the action itself like this (ALTHOUGH, in the documentation it is not described that way):
However on “windows-latest”, the “cd ${{ github.action_path }}” returns and error that there is no such a directory:
UPDATE 2:
made it work on “windows-latest” as well.
Turns out that “windows-latest” doesn’t work with ${{ github.action_path }}, so instead I used $GITHUB_ACTION_PATH, which apparent…