.github/workflows/codeql-analysis.yml: cache Go artifacts

This commit is contained in:
Aliaksandr Valialkin 2023-11-21 13:04:57 +02:00
parent 2ebd5cbb53
commit fc40ebba7a
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB
2 changed files with 14 additions and 1 deletions

View file

@ -19,7 +19,7 @@ jobs:
- name: Setup Go
id: go
uses: actions/setup-go@main
uses: actions/setup-go@v4
with:
go-version: stable
cache: false

View file

@ -55,9 +55,22 @@ jobs:
uses: actions/checkout@v4
- name: Set up Go
id: go
uses: actions/setup-go@v4
with:
go-version: stable
cache: false
if: ${{ matrix.language == 'go' }}
- name: Cache Go artifacts
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/go/bin
key: go-artifacts-${{ runner.os }}-codeql-analyze-${{ steps.go.outputs.go-version }}-${{ hashFiles('go.sum', 'Makefile', 'app/**/Makefile') }}
restore-keys: go-artifacts-${{ runner.os }}-codeql-analyze-
if: ${{ matrix.language == 'go' }}
# Initializes the CodeQL tools for scanning.