Skip to content

Commit 15894da

Browse files
🩹 [Patch]: Update README.md to clarify script path usage and emphasize the importance of using the correct action path variable
1 parent e7420da commit 15894da

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎README.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ The `Script` supports the following formats:
8282
- `. '.\tests\info.ps1'`
8383
- `. './tests/info.ps1'`
8484

85-
If you are creation an action of your own, you should use the `${{ github.action_path }}` variable to get the path to the action.
86-
You should avoid using `$env:GITHUB_ACTION_PATH` as it will not be the expected value if you nest actions inside one another.
85+
> [!IMPORTANT]
86+
> Use `${{ github.action_path }}/<pathToScript.ps1>` if you are creation an action of your own using this action as a step. This will ensure that
87+
> the path to the script is from the calling action, and not the `GitHub-Script` action repo. Using `$env:GITHUB_ACTION_PATH` may have mixed results
88+
> when you nest actions inside one another. The context syntax will be expanded to the correct path at runtime.
8789

8890
> [!WARNING]
8991
> Using `tests\info.ps1` is PowerShells syntax for calling a function under a specific module.

0 commit comments

Comments
 (0)