Files
donotpassgo/action.yaml

57 lines
1.9 KiB
YAML
Raw Permalink Normal View History

2025-05-10 01:16:42 -04:00
name: "donotpassgo"
2026-04-03 00:22:36 -04:00
description: "go security checks and unit tests"
inputs:
2026-04-03 00:22:36 -04:00
test-library: #TEST_LIBRARY
description: "if set, tests are run with the specific library (standard|ginkgo)"
required: false
default: "none"
2026-04-03 00:22:36 -04:00
test-version: #TEST_VERSION
2026-04-03 00:27:33 -04:00
description: "the test library version, if the library is none or standard this value is ignored"
2026-04-03 00:22:36 -04:00
required: false
default: "latest"
test-fail: #TEST_FAIL
description: "override switch to prevent jobs from failing when unit tests do"
required: false
default: "yes"
static: #STATIC_FLAG
description: "if set, static code checks are ran with gosec (yes|no)"
required: false
default: "yes"
static-fail: #STATIC_FAIL
description: "override switch to prevent jobs from failing when static code analysis does"
required: false
default: "yes"
vulnerability: #VULN_CHECK
description: "if set, dependencies are scanned with govulncheck (yes|no)"
required: false
default: "yes"
vulnerability-fail: #VULN_FAIL
description: "override switch to prevent jobs from failing when vulnerability scan does"
required: false
default: "yes"
2025-05-10 01:16:42 -04:00
runs:
using: "composite"
steps:
2026-04-03 00:22:36 -04:00
- name: "install dependencies"
shell: bash
2026-04-03 00:22:36 -04:00
run: ${{ github.action_path }}/src/install.sh
2026-04-03 00:27:33 -04:00
env:
TEST_LIBRARY: ${{ inputs.test-library }}
TEST_VERSION: ${{ inputs.test-version }}
2026-04-03 00:22:36 -04:00
- name: "run unit tests"
shell: bash
run: ${{ github.action_path }}/src/test.sh
2026-04-03 00:27:33 -04:00
env:
TEST_LIBRARY: ${{ inputs.test-library }}
TEST_FAIL: ${{ inputs.test-fail }}
2025-05-10 01:29:37 -04:00
2026-04-03 00:22:36 -04:00
- name: "run security checks"
shell: bash
2026-04-03 15:11:33 -04:00
run: ${{ github.action_path }}/src/security.sh
env:
STATIC_FLAG: ${{ inputs.static }}
STATIC_FAIL: ${{ inputs.static-fail }}
VULN_CHECK: ${{ inputs.vulnerability }}
VULN_FAIL: ${{ inputs.vulnerability-fail }}