Skip to content

Commit 097b573

Browse files
committed
Update build workflow with package installtion
1 parent f261099 commit 097b573

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,6 @@ jobs:
3333
# it relies on the existence of a go.sum file.
3434
cache: false
3535
go-version: "1.20"
36-
- id: setup-go-critic
37-
run: go install -v github.com/go-critic/go-critic/cmd/[email protected]
38-
- id: setup staticheck
39-
uses: actions/checkout@v3
40-
with:
41-
fetch-depth: 1
42-
- name: Run staticcheck
43-
uses: dominikh/[email protected]
44-
with:
45-
version: "2022.1.3"
46-
- id: setup-go-sec
47-
uses: actions/checkout@v3
48-
env:
49-
GO111MODULE: on
50-
- name: Run Gosec Security Scanner
51-
uses: securego/gosec@master
5236
- name: Lookup Go cache directory
5337
id: go-cache
5438
run: |
@@ -80,6 +64,16 @@ jobs:
8064
${{ env.BASE_CACHE_KEY }}
8165
- name: Setup curl cache
8266
run: mkdir -p ${{ env.CURL_CACHE_DIR }}
67+
- name: Install GoCritic
68+
env:
69+
PACKAGE_URL: github.com/go-critic/go-critic/cmd/gocritic
70+
PACKAGE_VERSION: ${{ steps.setup-env.outputs.go-critic-version }}
71+
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
72+
- name: Install GoSec
73+
env:
74+
PACKAGE_URL: github.com/securego/gosec/v2/cmd/gosec
75+
PACKAGE_VERSION: ${{ steps.setup-env.outputs.gosec-version }}
76+
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
8377
- name: Install Packer
8478
env:
8579
PACKER_VERSION: ${{ steps.setup-env.outputs.packer-version }}
@@ -101,6 +95,11 @@ jobs:
10195
PACKAGE_URL: mvdan.cc/sh/v3/cmd/shfmt
10296
PACKAGE_VERSION: ${{ steps.setup-env.outputs.shfmt-version }}
10397
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
98+
- name: Install Staticcheck
99+
env:
100+
PACKAGE_URL: dominikh/staticcheck-action
101+
PACKAGE_VERSION: ${{ steps.setup-env.outputs.go-staticcheck-version }}
102+
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
104103
- name: Install Terraform-docs
105104
env:
106105
PACKAGE_URL: github.com/terraform-docs/terraform-docs

0 commit comments

Comments
 (0)