You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The github action passes the filename in as a second argument, but then fails with:
error: Found argument './pr_body' which wasn't expected, or isn't valid in this context
USAGE:
markdown-extract <pattern> <path> --no-print-matched-heading
For more information try --help
validate test plan
...assuming the filename is "./pr_body" I get the same failure without the leading ./, as well as with an absolute path.
After doing a little bit of research, the workspace in an action is mounted in the container under /github/workspace. So, it'd be nice if either the docs mentioned to prefix files with /github/workspace, or if the action Dockerfile set the workdir to /github/workspace and the docs said to use relative paths.
Or, probably ideally, maybe the binary detects that it's running as an action and does the path translation. Relative path = prefix /github/workspace, absolute path = substitue env $GITHUB_WORKDIR for /github/workspace or alert that the file must be located there if it's not. It's possible to use a different entrypoint in the action metadata. You can specify analternate entrypoint in the action.yml, so this logic could be encapsulated into a shell script which does the arg manipulation and then passes them along to the real program. It could even handle a /github/workspace prefix specially and leave that alone for backwards compatibility.
The text was updated successfully, but these errors were encountered:
I have actually not tested the GitHub action recently, so please let me know if you run into anything else whilst you're using markdown-extract :)
I am currently on vacation, away from my development environment. I'd be happy to take a good look when I'm back online in two weeks time, or if you are blocked and can't wait, I can review a PR for any essential fixes
...and looking closer, the docker run command github uses sets the workdir, so a relative path should just work to begin with. I'm getting an argument parsing error. I wonder if it's because the heading contains a space.
The github action passes the filename in as a second argument, but then fails with:
...assuming the filename is "./pr_body" I get the same failure without the leading
./
, as well as with an absolute path.After doing a little bit of research, the workspace in an action is mounted in the container under
/github/workspace
. So, it'd be nice if either the docs mentioned to prefix files with /github/workspace, or if the action Dockerfile set the workdir to /github/workspace and the docs said to use relative paths.Or, probably ideally, maybe the binary detects that it's running as an action and does the path translation. Relative path = prefix /github/workspace, absolute path = substitue env $GITHUB_WORKDIR for /github/workspace or alert that the file must be located there if it's not. It's possible to use a different entrypoint in the action metadata. You can specify analternate entrypoint in the action.yml, so this logic could be encapsulated into a shell script which does the arg manipulation and then passes them along to the real program. It could even handle a /github/workspace prefix specially and leave that alone for backwards compatibility.
The text was updated successfully, but these errors were encountered: