Skip to content

Merge pull request #226 from free5gc/dependabot/go_modules/golang.org… #648

Merge pull request #226 from free5gc/dependabot/go_modules/golang.org…

Merge pull request #226 from free5gc/dependabot/go_modules/golang.org… #648

Workflow file for this run

name: Go
on:
push:
branches: [ main ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.26.2' ]
name: Go ${{ matrix.go }} sample
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
- name: Install Syft
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
- name: Generate SBOM
run: |
syft . -o table=sbom-table.txt
- name: Install Grype
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin
- name: Run Grype vulnerability scan
run: |
grype . --output table --file grype-report.txt
- name: Upload Security Reports
uses: actions/upload-artifact@v4
if: always()
with:
name: security-reports-${{ github.sha }}
path: |
sbom-table.txt
grype-report.*
retention-days: 10