Skip to content

Merge pull request #418 from CycloneDX/dependabot/github_actions/sigs… #1376

Merge pull request #418 from CycloneDX/dependabot/github_actions/sigs…

Merge pull request #418 from CycloneDX/dependabot/github_actions/sigs… #1376

Workflow file for this run

name: CI
on:
push:
branches:
- main
paths-ignore:
- examples/**
pull_request:
branches:
- main
paths-ignore:
- examples/**
permissions: { }
jobs:
licensecheck:
name: License Check
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
- name: Check license headers
uses: apache/skywalking-eyes@438e4ea5682269933ea2c8b5608662e52af26959 # tag=v0.4.0
with:
config: .licenserc.yml
lint:
name: Lint
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
- name: Setup Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # tag=v5.0.0
with:
go-version: "1.21"
check-latest: true
- name: Run golangci-lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # tag=v3.7.0
with:
version: latest
- name: Scan Dockerfiles
uses: aquasecurity/trivy-action@d43c1f16c00cfd3978dde6c07f4bbcf9eb6993ca # tag=0.16.1
with:
scan-type: config
skip-files: "Dockerfile.examples,Dockerfile.gitpod"
severity: "MEDIUM,HIGH,CRITICAL"
exit-code: "1"
test:
name: Test
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # tag=v5.0.0
with:
go-version: "1.21"
check-latest: true
- name: Setup CycloneDX CLI
run: |
mkdir -p "$HOME/.local/bin"
echo "$HOME/.local/bin" >> $GITHUB_PATH
wget -O "$HOME/.local/bin/cyclonedx" https://github.com/CycloneDX/cyclonedx-cli/releases/download/v0.25.0/cyclonedx-linux-x64
echo "bd26ccba454cc9f12b6860136e1b14117b829a5f27e993607ff526262c5a7ff0 $HOME/.local/bin/cyclonedx" | sha256sum -c
chmod +x "$HOME/.local/bin/cyclonedx"
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
- name: Test
run: make test