Open
Description
I submitted this before as it didn't work, I saw your comment. My goal was to email specific attachments to the Author when the job fails (not all the logs just things I want to send).
FYI I was able to make it work by doing this:
YAML:
echo "USER_EMAIL=$(git log -1 HEAD | grep -m 1 -E -o '[[:alnum:].-]+@[[:alnum:].-]+.[[:alnum:]]{2,}')" >> $GITHUB_ENV
Change I make in your code:
from:
const to = core.getInput("to", { required: true })
to:
const to = process.env.USER_EMAIL
as getInput() simply wouldn't access the env. Seems like it only works with built-in vars like secrets. Anyway, not sure how valid this hack is but wanted to share. Feel free to close :)
Metadata
Assignees
Labels
No labels