Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation how to continue on failure #128

Open
kzantow opened this issue Oct 5, 2021 · 3 comments
Open

Update documentation how to continue on failure #128

kzantow opened this issue Oct 5, 2021 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@kzantow
Copy link
Contributor

kzantow commented Oct 5, 2021

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

@kzantow kzantow added the documentation Improvements or additions to documentation label Oct 5, 2021
@edwardyufinnai
Copy link

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

@spiffcs
Copy link
Contributor

spiffcs commented Dec 7, 2021

Thanks for the context @edwardyufinnai. We'll take a look at if there is any way we can make this better going forward.

@AErmie
Copy link

AErmie commented Feb 20, 2022

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() }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: No status
Development

No branches or pull requests

4 participants