jakejarvis / lighthouse-action

💡🏠 GitHub Action for running @GoogleChromeLabs Lighthouse webpage audits

Home Page:https://github.com/marketplace/actions/lighthouse-audit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Output result to Slack

marcuslindblom opened this issue · comments

Is it possible to get the output from the audit and forward it to e.g Slack?

Hi there, apologies for the late response!

I don't have much experience with Slack and its API so it might be best to use an existing action for that, there seem to be quite a few:

...and then set the message using steps.<step id>.outputs according to the docs here. I have no idea if this would actually work but I can play around with this when I get a chance in the next few days.

Thanks for your patience!

Ok, thanks! Is steps.<step id>.outputs the complete message that is printed in stdout?

I don't think outputs has anything defined, looking at the entrypoint.sh. That script would have to return something for it work, pretty sure. @jakejarvis this is what #16 is all about. I don't know how to add that with a Dockerfile surrounding the script, but it should be a line or two of change I think.

@dgattey @marcuslindblom Started working on it. Seems like Github Actions is smart enough to look into the docker output :) #19

@jakejarvis What do you think - shall we add an example on the README for Slack messages in order to close this issue, or is the updated README sufficient?

@BrunnerLivio I can't get the example to work. Do I need an updated version of the action?

Oh, I can see in the PR that you made some changes. My bad