generated from okp4/template-oss
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #438 from okp4/ci/codeql
ci(workflow): add codeql analysis job on go source
- Loading branch information
Showing
1 changed file
with
45 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,14 +35,14 @@ jobs: | |
- name: Lint regular markdown files | ||
uses: avto-dev/[email protected] | ||
with: | ||
args: '**/*.md' | ||
ignore: 'CHANGELOG.md docs/**/*.md' | ||
args: "**/*.md" | ||
ignore: "CHANGELOG.md docs/**/*.md" | ||
|
||
- name: Lint generated markdown files | ||
uses: avto-dev/[email protected] | ||
with: | ||
args: 'docs/**/*.md' | ||
config: 'docs/.markdownlint.yaml' | ||
args: "docs/**/*.md" | ||
config: "docs/.markdownlint.yaml" | ||
|
||
lint-yaml: | ||
runs-on: ubuntu-22.04 | ||
|
@@ -99,7 +99,7 @@ jobs: | |
uses: actions/[email protected] | ||
if: steps.changed-go-files.outputs.any_changed == 'true' | ||
with: | ||
go-version: '1.20' | ||
go-version: "1.20" | ||
cache: false | ||
|
||
- name: Lint go code (golangci-lint) | ||
|
@@ -118,6 +118,45 @@ jobs: | |
fi | ||
echo "✅ Code is gofumpt!" | ||
analyze-go: | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Find changed go files | ||
id: changed-go-files | ||
uses: tj-actions/[email protected] | ||
with: | ||
files: | | ||
**/*.go | ||
go.mod | ||
go.sum | ||
- name: Setup Go environment | ||
uses: actions/[email protected] | ||
with: | ||
go-version: "1.20" | ||
cache: false | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: "go" | ||
|
||
- name: Autobuild project | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
|
||
lint-dockerfile: | ||
runs-on: ubuntu-22.04 | ||
if: github.actor != 'dependabot[bot]' | ||
|
@@ -159,7 +198,7 @@ jobs: | |
- name: Setup Go environment | ||
uses: actions/[email protected] | ||
with: | ||
go-version: '1.20' | ||
go-version: "1.20" | ||
|
||
- name: Generate command documentation | ||
run: | | ||
|