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

This commit is contained in:
Aliaksandr Valialkin 2023-11-21 13:04:57 +02:00
parent 2b420b5c0a
commit 3a15c9ffb3
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 - name: Setup Go
id: go id: go
uses: actions/setup-go@main uses: actions/setup-go@v4
with: with:
go-version: stable go-version: stable
cache: false cache: false

View file

@ -55,9 +55,22 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up Go - name: Set up Go
id: go
uses: actions/setup-go@v4 uses: actions/setup-go@v4
with: with:
go-version: stable 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' }} if: ${{ matrix.language == 'go' }}
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.