From c48ded1994ebffb3d69712fac62d5983daba46a8 Mon Sep 17 00:00:00 2001 From: Anoop Gopalakrishnan <2038273+anoop2811@users.noreply.github.com> Date: Tue, 4 Mar 2025 20:03:01 -0800 Subject: [PATCH] Fix: build failure due to deprecated actions/cache (#6711) * Fix(build): Upgrade actions/cache version Signed-off-by: Anoop Gopalakrishnan * Fix(build): Update actions/cache Signed-off-by: Anoop Gopalakrishnan --------- Signed-off-by: Anoop Gopalakrishnan --- .github/workflows/go.yml | 19 +++++++++---------- .github/workflows/unit-test.yml | 9 ++++----- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 837f2d9c4..6bc179e43 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -11,16 +11,15 @@ on: - master - release-* -permissions: # added using https://github.com/step-security/secure-workflows +permissions: # added using https://github.com/step-security/secure-workflows contents: read env: # Common versions - GO_VERSION: '1.22' - GOLANGCI_VERSION: 'v1.54.2' + GO_VERSION: "1.22" + GOLANGCI_VERSION: "v1.54.2" jobs: - detect-noop: runs-on: ubuntu-22.04 outputs: @@ -64,8 +63,8 @@ jobs: needs: detect-noop if: needs.detect-noop.outputs.noop != 'true' permissions: - contents: read # for actions/checkout to fetch code - pull-requests: read # for golangci/golangci-lint-action to fetch pull requests + contents: read # for actions/checkout to fetch code + pull-requests: read # for golangci/golangci-lint-action to fetch pull requests steps: - name: Setup Go @@ -106,10 +105,10 @@ jobs: - name: Setup node uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b with: - node-version: '14' + node-version: "14" - name: Cache Go Dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@v4 with: path: .work/pkg key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} @@ -128,7 +127,7 @@ jobs: run: | export PATH=$(pwd)/bin/:$PATH make check-diff - + - name: Cleanup binary run: make build-cleanup @@ -149,7 +148,7 @@ jobs: go-version: ${{ env.GO_VERSION }} - name: Cache Go Dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@v4 with: path: .work/pkg key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 1dda4deca..93c270380 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -5,7 +5,7 @@ on: branches: - master - release-* - workflow_dispatch: { } + workflow_dispatch: {} pull_request: branches: - master @@ -16,13 +16,12 @@ permissions: env: # Common versions - GO_VERSION: '1.22' + GO_VERSION: "1.22" jobs: - detect-noop: permissions: - actions: write # for fkirc/skip-duplicate-actions to skip or stop workflow runs + actions: write # for fkirc/skip-duplicate-actions to skip or stop workflow runs runs-on: ubuntu-22.04 outputs: noop: ${{ steps.noop.outputs.should_skip }} @@ -53,7 +52,7 @@ jobs: submodules: true - name: Cache Go Dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@v4 with: path: .work/pkg key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}