File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
3+ version : 2
4+ updates :
5+ - package-ecosystem : " gomod"
6+ directory : " /" # Location of package manifests
7+ schedule :
8+ interval : " daily"
Original file line number Diff line number Diff line change 1+ name : Tidy
2+
3+ on :
4+ push :
5+ branches :
6+ - ' master'
7+ paths :
8+ - ' .github/workflows/gotidy.yml'
9+ - ' go.mod'
10+ - ' go.sum'
11+
12+ jobs :
13+ fix :
14+ runs-on : ubuntu-latest
15+ steps :
16+ -
17+ name : Checkout
18+ uses : actions/checkout@v2.3.1
19+ -
20+ name : Set up Go
21+ uses : actions/setup-go@v2
22+ with :
23+ go-version : 1.13
24+ -
25+ name : Tidy
26+ run : |
27+ rm -f go.sum
28+ go mod tidy
29+ -
30+ name : Set up Git
31+ env :
32+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33+ run : |
34+ git config user.name GitHub
35+ git config user.email noreply@github.com
36+ git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
37+ -
38+ name : Commit and push changes
39+ run : |
40+ git add .
41+ if output=$(git status --porcelain) && [ ! -z "$output" ]; then
42+ git commit --author "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" --message "Fix go modules"
43+ git push
44+ fi
Original file line number Diff line number Diff line change 1+ on : [push, pull_request]
2+ name : Linter
3+ jobs :
4+ Golint :
5+ runs-on : ubuntu-latest
6+ steps :
7+ - name : Fetch Repository
8+ uses : actions/checkout@v2
9+ - name : Run Golint
10+ uses : reviewdog/action-golangci-lint@v1
11+ with :
12+ golangci_lint_flags : " --tests=false"
Original file line number Diff line number Diff line change 1+ on : [push, pull_request]
2+ name : Security
3+ jobs :
4+ Gosec :
5+ runs-on : ubuntu-latest
6+ steps :
7+ - name : Fetch Repository
8+ uses : actions/checkout@v2
9+ - name : Run Gosec
10+ uses : securego/gosec@master
11+ with :
12+ args : ./...
You can’t perform that action at this time.
0 commit comments