Merge pull request #306 from anchore/dependabot/go_modules/github.com… #590
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
name: "Static Analysis" | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
Static-Analysis: | |
strategy: | |
matrix: | |
go-version: ["1.22.x"] | |
platform: [ubuntu-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed #v5.1.0 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Restore bootstrap cache | |
id: bootstrap-cache | |
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a #v4.1.2 | |
with: | |
path: | | |
~/go/pkg/mod | |
${{ github.workspace }}/.tmp | |
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}-${{ hashFiles('Makefile') }} | |
restore-keys: | | |
${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}- | |
${{ runner.os }}-go-${{ matrix.go-version }}- | |
- name: Bootstrap project dependencies | |
if: steps.bootstrap-cache.outputs.cache-hit != 'true' | |
run: make bootstrap | |
- name: Run static analysis | |
run: make static-analysis |