Merge pull request #494 from CycloneDX/dependabot/go_modules/golang.o… #1540
This file contains 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 | |
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@692973e3d937129bcbf40652eb9f2f61becf3332 # tag=v4.1.7 | |
- name: Check license headers | |
uses: apache/skywalking-eyes@cd7b195c51fd3d6ad52afceb760719ddc6b3ee91 # tag=v0.6.0 | |
with: | |
config: .licenserc.yml | |
lint: | |
name: Lint | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag=v4.1.7 | |
- name: Setup Go | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # tag=v5.0.2 | |
with: | |
go-version: "1.22" | |
check-latest: true | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # tag=v6.0.1 | |
with: | |
version: latest | |
- name: Scan Dockerfiles | |
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # tag=0.24.0 | |
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@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # tag=v5.0.2 | |
with: | |
go-version: "1.22" | |
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@692973e3d937129bcbf40652eb9f2f61becf3332 # tag=v4.1.7 | |
- name: Test | |
run: make test |