Skip to content

chore: upgrade go version 1.22.1 #408

chore: upgrade go version 1.22.1

chore: upgrade go version 1.22.1 #408

Workflow file for this run

name: PR Validation
on:
pull_request:
branches:
- master
merge_group:
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for 2ms to have visibility to all commit history
- uses: actions/setup-go@v5
with:
go-version: "^1.22"
- name: go mod tidy
run: |
go mod tidy
git diff --exit-code
- name: Go Linter
run: docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.52.0 golangci-lint run -v -E gofmt --timeout=5m --out-format github-actions
- name: Run 2ms Scan
run: go run . git . --config .2ms.yml
- name: Go Test
run: go test -v ./...
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- run: make build
- name: docker run
run: |
docker run -v "$(pwd)":/repo -t checkmarx/2ms:latest git /repo --report-path /output/results.json --ignore-on-exit results
kics:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: mkdir -p kics-results
- name: Run KICS scan
uses: checkmarx/kics-github-action@master
with:
path: Dockerfile
output_path: kics-results
output_formats: json,sarif
enable_comments: ${{ github.event_name == 'pull_request'}}
fail_on: high,medium
- name: Show KICS results
if: failure()
run: cat kics-results/results.json
# - name: Upload SARIF file
# uses: github/codeql-action/upload-sarif@v3
# with:
# sarif_file: kics-results/results.sarif