From 3a15c9ffb3fec58979eebff3cfada33b1af590e6 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 21 Nov 2023 13:04:57 +0200 Subject: [PATCH] .github/workflows/codeql-analysis.yml: cache Go artifacts --- .github/workflows/check-licenses.yml | 2 +- .github/workflows/codeql-analysis.yml | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-licenses.yml b/.github/workflows/check-licenses.yml index 1551b6d2c..55024c649 100644 --- a/.github/workflows/check-licenses.yml +++ b/.github/workflows/check-licenses.yml @@ -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 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f359a243e..7f001fb26 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -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.