In a JavaScript action, how do I execute a Git command and save the output to a variable? #26546
-
Hello. I have created a JavaScript GitHub action, and inside, want to execute a simple Git command and save it to a JavaScript variable. Using the exec toolkit package, I can execute the Git command. That prints the correct output to the console ( I have intermediate JavaScript and Git experience. But this is my first experience with GitHub actions. My Code (in my JavaScript action)
Output
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Check this part of the docs:
|
Beta Was this translation helpful? Give feedback.
-
OK thanks so much–that’s exactly what I needed. Didn’t read the docs carefully enough :-/ |
Beta Was this translation helpful? Give feedback.
Check this part of the docs: