Fix syntax highlighter docs. Improve installation documentation. Add … #198
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Test & lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Check formatting | |
| run: | | |
| unformatted=$(gofmt -l .) | |
| if [ -n "$unformatted" ]; then | |
| echo "These files are not gofmt-clean:" | |
| echo "$unformatted" | |
| exit 1 | |
| fi | |
| - name: Check modernizations | |
| run: make fix-check | |
| - name: Vet | |
| run: make vet | |
| - name: Test | |
| run: make test | |
| - name: Build | |
| run: make build | |
| - name: Install golangci-lint | |
| run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.12.2 | |
| - name: Lint | |
| run: make lint | |
| security: | |
| name: Security (SAST & vulnerabilities) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: gosec SAST & govulncheck | |
| run: make sec | |
| sbom: | |
| name: SBOM & vulnerability scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Install SBOM tooling | |
| run: | | |
| go install github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@latest | |
| curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b "$(go env GOPATH)/bin" | |
| - name: Generate and scan SBOM | |
| run: make sbom-audit | |
| - name: Upload SBOM | |
| if: always() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: cchef-sbom | |
| path: dist/sbom/cchef-sbom.json |