mirror of https://github.com/k3s-io/k3s
Expand GHA go caching to includ newest release branch (#10334)
Signed-off-by: Derek Nola <derek.nola@suse.com>pull/10354/head
parent
125f5bf501
commit
8ac224148a
|
@ -6,10 +6,10 @@ runs:
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod' # Just use whatever version is in the go.mod file
|
go-version-file: 'go.mod' # Just use whatever version is in the go.mod file
|
||||||
cache: ${{ github.ref == 'refs/heads/master' }}
|
cache: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/release-1.29' }}
|
||||||
|
|
||||||
- name: Prepare for go cache
|
- name: Prepare for go cache
|
||||||
if: ${{ github.ref != 'refs/heads/master' }}
|
if: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/release-1.29' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "GO_CACHE=$(go env GOCACHE)" | tee -a "$GITHUB_ENV"
|
echo "GO_CACHE=$(go env GOCACHE)" | tee -a "$GITHUB_ENV"
|
||||||
|
@ -17,7 +17,7 @@ runs:
|
||||||
echo "GO_VERSION=$(go env GOVERSION | tr -d 'go')" | tee -a "$GITHUB_ENV"
|
echo "GO_VERSION=$(go env GOVERSION | tr -d 'go')" | tee -a "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Setup read-only cache
|
- name: Setup read-only cache
|
||||||
if: ${{ github.ref != 'refs/heads/master' }}
|
if: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/release-1.29' }}
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
|
|
Loading…
Reference in New Issue