1
0
Fork 0
mirror of https://github.com/imjasonh/govulncheck-action synced 2026-07-08 08:45:48 +00:00
govulncheck-action/.github/workflows/example.yml
dependabot[bot] 8590c82c7a
chore(deps): bump the github-actions group with 2 updates (#33)
Bumps the github-actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/checkout` from 4 to 5
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

Updates `github/codeql-action` from 3.29.7 to 3.29.8
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](51f77329af...76621b61de)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-version: 3.29.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-12 06:40:30 +00:00

40 lines
1.2 KiB
YAML

name: Example Vulnerability Check
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch: # Allow manual triggering
jobs:
example:
name: Check Example for Vulnerabilities
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Run govulncheck on example
id: govulncheck
uses: ./
with:
working-directory: './example'
# We expect the check to fail, since there are known vulnerabilities in the example code.
# Therefore, we fail if no vulnerabilities are found.
- name: Check for vulnerabilities
if: steps.govulncheck.outputs.vulnerabilities-found != 'true'
run: |
echo "No vulnerabilities found, but we expected some in the example code."
exit 1
- name: Demonstrate conditional failure
run: |
echo "In a real workflow, you might want to fail if vulnerabilities are found:"
echo "if: steps.govulncheck.outputs.vulnerabilities-found == 'true'"
echo "run: exit 1"