Merge pull request #7755 from vmware-tanzu/dependabot/github_actions/actions/cache-4

Bump actions/cache from 2 to 4
This commit is contained in:
Xun Jiang/Bruce Jiang
2024-05-16 11:09:52 +08:00
committed by GitHub
3 changed files with 10 additions and 10 deletions

View File

@@ -19,7 +19,7 @@ jobs:
# Look for a CLI that's made for this PR
- name: Fetch built CLI
id: cache
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: cache-velero-cli
with:
@@ -31,7 +31,7 @@ jobs:
velero-${{ github.event.pull_request.number }}-
- name: Fetch cached go modules
uses: actions/cache@v2
uses: actions/cache@v4
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ~/go/pkg/mod
@@ -69,7 +69,7 @@ jobs:
steps:
- name: Fetch built CLI
id: cache
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: cache-velero-cli
with:

View File

@@ -19,20 +19,20 @@ jobs:
# Look for a CLI that's made for this PR
- name: Fetch built CLI
id: cli-cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ./_output/bin/linux/amd64/velero
# The cache key a combination of the current PR number and the commit SHA
key: velero-cli-${{ github.event.pull_request.number }}-${{ github.sha }}
- name: Fetch built image
id: image-cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ./velero.tar
# The cache key a combination of the current PR number and the commit SHA
key: velero-image-${{ github.event.pull_request.number }}-${{ github.sha }}
- name: Fetch cached go modules
uses: actions/cache@v2
uses: actions/cache@v4
if: steps.cli-cache.outputs.cache-hit != 'true'
with:
path: ~/go/pkg/mod
@@ -95,13 +95,13 @@ jobs:
image: "kindest/node:v${{ matrix.k8s }}"
- name: Fetch built CLI
id: cli-cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ./_output/bin/linux/amd64/velero
key: velero-cli-${{ github.event.pull_request.number }}-${{ github.sha }}
- name: Fetch built Image
id: image-cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ./velero.tar
key: velero-image-${{ github.event.pull_request.number }}-${{ github.sha }}
@@ -110,7 +110,7 @@ jobs:
kind load image-archive velero.tar
# always try to fetch the cached go modules as the e2e test needs it either
- name: Fetch cached go modules
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}

View File

@@ -15,7 +15,7 @@ jobs:
- name: Check out the code
uses: actions/checkout@v4
- name: Fetch cached go modules
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}