fix(ci): restore cached gosec binary in workflows
This commit is contained in:
@@ -48,11 +48,24 @@ jobs:
|
|||||||
go mod tidy
|
go mod tidy
|
||||||
go mod verify
|
go mod verify
|
||||||
|
|
||||||
|
- name: Restore cached gosec binary
|
||||||
|
id: cache-gosec
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ${{ runner.temp }}/gosec-bin
|
||||||
|
key: gosec-v2.22.4-${{ runner.os }}-${{ runner.arch }}
|
||||||
|
|
||||||
|
- name: Install gosec binary
|
||||||
|
if: steps.cache-gosec.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
mkdir -p "${RUNNER_TEMP}/gosec-bin"
|
||||||
|
GOBIN="${RUNNER_TEMP}/gosec-bin" go install github.com/securego/gosec/v2/cmd/gosec@v2.22.4
|
||||||
|
|
||||||
- name: Run gosec security analysis
|
- name: Run gosec security analysis
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
go install github.com/securego/gosec/v2/cmd/gosec@v2.22.4
|
"${RUNNER_TEMP}/gosec-bin/gosec" ./...
|
||||||
gosec ./...
|
|
||||||
|
|
||||||
- name: Run govulncheck
|
- name: Run govulncheck
|
||||||
uses: golang/govulncheck-action@v1.0.4
|
uses: golang/govulncheck-action@v1.0.4
|
||||||
|
|||||||
@@ -44,11 +44,24 @@ jobs:
|
|||||||
go mod tidy
|
go mod tidy
|
||||||
go mod verify
|
go mod verify
|
||||||
|
|
||||||
|
- name: Restore cached gosec binary
|
||||||
|
id: cache-gosec
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ${{ runner.temp }}/gosec-bin
|
||||||
|
key: gosec-v2.22.4-${{ runner.os }}-${{ runner.arch }}
|
||||||
|
|
||||||
|
- name: Install gosec binary
|
||||||
|
if: steps.cache-gosec.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
mkdir -p "${RUNNER_TEMP}/gosec-bin"
|
||||||
|
GOBIN="${RUNNER_TEMP}/gosec-bin" go install github.com/securego/gosec/v2/cmd/gosec@v2.22.4
|
||||||
|
|
||||||
- name: Run gosec security analysis
|
- name: Run gosec security analysis
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
go install github.com/securego/gosec/v2/cmd/gosec@v2.22.4
|
"${RUNNER_TEMP}/gosec-bin/gosec" ./...
|
||||||
gosec ./...
|
|
||||||
|
|
||||||
- name: Run govulncheck
|
- name: Run govulncheck
|
||||||
uses: golang/govulncheck-action@v1.0.4
|
uses: golang/govulncheck-action@v1.0.4
|
||||||
|
|||||||
Reference in New Issue
Block a user