Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 290d2a8

Browse files
Merge pull request #83 from intel/github_actions
Adding github action workflows
2 parents b52b58c + 3642627 commit 290d2a8

File tree

3 files changed

+91
-1
lines changed

3 files changed

+91
-1
lines changed

Diff for: .github/workflows/codeql.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
schedule:
9+
- cron: "37 4 * * 0"
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [ go ]
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v2
31+
with:
32+
languages: ${{ matrix.language }}
33+
queries: +security-and-quality
34+
35+
- name: Autobuild
36+
uses: github/codeql-action/autobuild@v2
37+
38+
- name: Perform CodeQL Analysis
39+
uses: github/codeql-action/analyze@v2
40+
with:
41+
category: "/language:${{ matrix.language }}"

Diff for: .github/workflows/static-scan.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Go-static-analysis
2+
on: [push, pull_request]
3+
jobs:
4+
5+
golangci:
6+
name: Lint
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: golangci-lint
11+
uses: golangci/golangci-lint-action@v2
12+
with:
13+
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
14+
version: v1.52.2
15+
16+
shellcheck:
17+
name: Shellcheck
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Run ShellCheck
22+
uses: ludeeus/action-shellcheck@master
23+
hadolint:
24+
runs-on: ubuntu-latest
25+
name: Hadolint
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: brpaz/[email protected]
29+
name: Run Hadolint
30+
with:
31+
dockerfile: Dockerfile
32+
33+
go-check:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v3
37+
38+
- name: Set up Go
39+
uses: actions/setup-go@v3
40+
with:
41+
go-version: 1.18.x
42+
43+
# if this fails, run go mod tidy
44+
- name: Check if module files are consistent with code
45+
run: go mod tidy && git diff --exit-code
46+
47+
# if this fails, run go mod vendor
48+
- name: Check if vendor directory is consistent with go modules
49+
run: go mod vendor && git diff --exit-code

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/intel/userspace-cni-network-plugin/badge)](https://api.securityscorecards.dev/projects/github.com/intel/userspace-cni-network-plugin)
22
* [Summary](#summary)
33
* [Links](#links)
44
* [Weekly Meeting](#weekly-meeting)

0 commit comments

Comments
 (0)