Open robermp opened 3 years ago
Hey @robermp we're trying to do something very similar - where did you insert the above code to get the output you wanted? Do you have a PR against this repo that you could make available?
Hi I insert the code just before these lines inside entrypoint.sh file:
echo "Executing terrascan as follows:" echo "terrascan scan ${args}" terrascan scan ${args} res=$?
I cant' do a PR because i'm not contributor
This worked for me. Thank you!
I was also able to use unsplash/comment-on-pr@v1.3.0 to return output to our CI system. Very cool!
Hi @robermp,
A PR would be much appreciated. You should be able to fork the repo and issue a PR from your fork. I'll create the PR if you can't get to it.
@elijah, do you have an example of how you're using unsplash/comment-on-pr@v1.3.0 with the terrascan-action that you could share?
Like this, to push a comment back to the PR:
- name: comment PR for results id: results uses: unsplash/comment-on-pr@v1.3.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: msg: "${{ steps.terrascan.outputs.result }}"
Hi @cesar-rodriguez, i generate the PR: https://github.com/accurics/terrascan-action/pull/39
The stdout of the action is empty, so to see the results in PR some lines are needed:
With this the in the PR the output of the terrascan can be read like this:
Using stdout:
Using log output: