Skip to content

workout

workout #79

Workflow file for this run

name: Lint and Build
on:
push:
tags-ignore:
- '*'
branches:
- '*'
pull_request:
branches: ['main', 'master']
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
go_version: "1.25.4"
fail_level: "none"
build:
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.25.4'
- name: Install dependencies
run: go get ./...
- name: Test
run: go test -v ./... --race
- name: Build
run: go build -v ./...
- name: Build Container
run: go build -v ./...
- name: Build an image from Dockerfile
run: |
docker build -t controlplane/netassert:${{ github.sha }} .
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'controlplane/netassert:${{ github.sha }}'
format: 'table'
ignore-unfixed: true
exit-code: '1'
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH,MEDIUM'