You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@skywalking.apache.org by ke...@apache.org on 2023/03/28 05:56:42 UTC
[skywalking-eyes] 01/01: Leverage the built-in cache in setup-go@v4
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a commit to branch ghacache
in repository https://gitbox.apache.org/repos/asf/skywalking-eyes.git
commit bc85272d8c842d155f84bb126e8d59777f2bc368
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Tue Mar 28 13:56:31 2023 +0800
Leverage the built-in cache in setup-go@v4
---
action.yml | 25 +------------------------
dependency/action.yml | 25 +------------------------
header/action.yml | 25 +------------------------
3 files changed, 3 insertions(+), 72 deletions(-)
diff --git a/action.yml b/action.yml
index 5c3bf10..690bae8 100644
--- a/action.yml
+++ b/action.yml
@@ -48,30 +48,7 @@ runs:
uses: actions/setup-go@v4
with:
go-version: 1.18
- - if: runner.os == 'Linux'
- uses: actions/cache@v3
- with:
- path: |
- ~/.cache/go-build
- ~/go/pkg/mod
- key: license-eye-${{ runner.os }}-go-${{ hashFiles(format('{0}/{1}', github.action_path, 'go.sum')) }}
- restore-keys: license-eye-${{ runner.os }}-go-
- - if: runner.os == 'macOS'
- uses: actions/cache@v3
- with:
- path: |
- ~/Library/Caches/go-build
- ~/go/pkg/mod
- key: license-eye-${{ runner.os }}-go-${{ hashFiles(format('{0}/{1}', github.action_path, 'go.sum')) }}
- restore-keys: license-eye-${{ runner.os }}-go-
- - if: runner.os == 'Windows'
- uses: actions/cache@v3
- with:
- path: |
- ~\AppData\Local\go-build
- ~\go\pkg\mod
- key: license-eye-${{ runner.os }}-go-${{ hashFiles(format('{0}/{1}', github.action_path, 'go.sum')) }}
- restore-keys: license-eye-${{ runner.os }}-go-
+ cache-dependency-path: ${{ github.action_path }}/go.sum
- shell: bash
run: make -C $GITHUB_ACTION_PATH install
- shell: bash
diff --git a/dependency/action.yml b/dependency/action.yml
index ee0cb44..8999902 100644
--- a/dependency/action.yml
+++ b/dependency/action.yml
@@ -42,30 +42,7 @@ runs:
uses: actions/setup-go@v4
with:
go-version: 1.18
- - if: runner.os == 'Linux'
- uses: actions/cache@v3
- with:
- path: |
- ~/.cache/go-build
- ~/go/pkg/mod
- key: license-eye-${{ runner.os }}-go-${{ hashFiles(format('{0}/{1}', github.action_path, 'go.sum')) }}
- restore-keys: license-eye-${{ runner.os }}-go-
- - if: runner.os == 'macOS'
- uses: actions/cache@v3
- with:
- path: |
- ~/Library/Caches/go-build
- ~/go/pkg/mod
- key: license-eye-${{ runner.os }}-go-${{ hashFiles(format('{0}/{1}', github.action_path, 'go.sum')) }}
- restore-keys: license-eye-${{ runner.os }}-go-
- - if: runner.os == 'Windows'
- uses: actions/cache@v3
- with:
- path: |
- ~\AppData\Local\go-build
- ~\go\pkg\mod
- key: license-eye-${{ runner.os }}-go-${{ hashFiles(format('{0}/{1}', github.action_path, 'go.sum')) }}
- restore-keys: license-eye-${{ runner.os }}-go-
+ cache-dependency-path: ${{ github.action_path }}/go.sum
- shell: bash
run: make -C $GITHUB_ACTION_PATH/.. install
- shell: bash
diff --git a/header/action.yml b/header/action.yml
index 659f9c8..5ea9f7f 100644
--- a/header/action.yml
+++ b/header/action.yml
@@ -48,30 +48,7 @@ runs:
uses: actions/setup-go@v4
with:
go-version: 1.18
- - if: runner.os == 'Linux'
- uses: actions/cache@v3
- with:
- path: |
- ~/.cache/go-build
- ~/go/pkg/mod
- key: license-eye-${{ runner.os }}-go-${{ hashFiles(format('{0}/{1}', github.action_path, 'go.sum')) }}
- restore-keys: license-eye-${{ runner.os }}-go-
- - if: runner.os == 'macOS'
- uses: actions/cache@v3
- with:
- path: |
- ~/Library/Caches/go-build
- ~/go/pkg/mod
- key: license-eye-${{ runner.os }}-go-${{ hashFiles(format('{0}/{1}', github.action_path, 'go.sum')) }}
- restore-keys: license-eye-${{ runner.os }}-go-
- - if: runner.os == 'Windows'
- uses: actions/cache@v3
- with:
- path: |
- ~\AppData\Local\go-build
- ~\go\pkg\mod
- key: license-eye-${{ runner.os }}-go-${{ hashFiles(format('{0}/{1}', github.action_path, 'go.sum')) }}
- restore-keys: license-eye-${{ runner.os }}-go-
+ cache-dependency-path: ${{ github.action_path }}/go.sum
- shell: bash
run: make -C $GITHUB_ACTION_PATH/.. install
- shell: bash