From 95f12c7e2801606fea6327a95a087ee8f97b29c3 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 21 Nov 2023 11:36:53 +0200 Subject: [PATCH] .github/workflows: use `stable` Go release - it should always point to the latest stable release This eliminates the need to update .github/workflows/* files whenever new Go stable release is out, like in the 2db1a664e14a72f2396e7ec069d12c54b0349310 . See https://github.com/actions/setup-go#using-stableoldstable-aliases --- .github/workflows/check-licenses.yml | 15 ++++++++++++--- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/main.yml | 6 +++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check-licenses.yml b/.github/workflows/check-licenses.yml index 52af9c352..91c56e2ca 100644 --- a/.github/workflows/check-licenses.yml +++ b/.github/workflows/check-licenses.yml @@ -17,10 +17,19 @@ jobs: - name: Setup Go uses: actions/setup-go@main with: - go-version: 1.21.4 + go-version: stable + cache: false id: go - name: Code checkout uses: actions/checkout@master + - name: Cache Go artifacts + uses: actions/cache@v3 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + ~/go/bin + key: go-artifacts-${{ runner.os }}-check-licenses-${{ hashFiles('go.sum') }} + restore-keys: go-artifacts-${{ runner.os }}-check-licenses- - name: Check License - run: | - make check-licenses + run: make check-licenses diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d7fb656a4..f359a243e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -57,7 +57,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.21.4 + go-version: stable if: ${{ matrix.language == 'go' }} # Initializes the CodeQL tools for scanning. diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7e0113b44..6dec8ab5d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v4 with: - go-version: 1.21.4 + go-version: stable cache: false - name: Cache Go artifacts @@ -62,7 +62,7 @@ jobs: id: go uses: actions/setup-go@v4 with: - go-version: 1.21.4 + go-version: stable cache: false - name: Cache Go artifacts @@ -92,7 +92,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v4 with: - go-version: 1.21.4 + go-version: stable cache: false - name: Cache Go artifacts