How to build file path for a JS import from within a reusable workflow #417
Replies: 2 comments
-
The solution was stop using github-script, checkout the repo containing the reusable workflows (using a Personal Access Token) from the callee workflow because the reusable workflow is actually executed in the callee's workflow context. Then use a regular |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'd like to know how to do it as well :( seems like a real showstopper |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have 2 workflows:
This works well, except when using
github-script
within the reusable workflow, because I'm unable to build a correct file path:I've tried:
github.action_path
but this is the path for repo A./home/runner/work/myproj/myproj
(like suggested here for "composite actions", which are different)github.workspace
same path, as above, for repo A./home/runner/work/myproj/myproj
github.path
gives/home/runner/work/_temp/_runner_file_commands/add_path_1d4d143f-7e45-4181-a863-88f16a7740fc"
, which won't help me build the file import path.${ process.cwd() }/lib/foo.js
I have no luck getting the import to work.
Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions