Update documentation how to continue on failure
This PR was opened for the use case of continuing on failure to check an exit code later. But there is already a way to do this with GitHub Actions, we should document this:
- uses: anchore/scan-action@v3
id: scan
continue-on-error: true
...
- run: exit 1
if: ${{steps.scan.outcome == 'failure'}}
Example: https://github.com/kzantow-anchore/sbom-action-test/blob/scan-test/.github/workflows/scan-test.yml
I just want to note that this doesn't solve the issue if this is wrapped in a composite action as currently it does not support continue-on-error
Thanks for the context @edwardyufinnai. We'll take a look at if there is any way we can make this better going forward.
I've used the following, to ensure the "Upload Anchore scan SARIF report" step will run regardless if the scan reports vulnerabilities or not.
if: ${{ success() || failure() }}