You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@skywalking.apache.org by wu...@apache.org on 2023/03/28 06:01:43 UTC
[skywalking-eyes] branch main updated: Leverage the built-in cache in setup-go@v4 (#157)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-eyes.git
The following commit(s) were added to refs/heads/main by this push:
new 5b7ee17 Leverage the built-in cache in setup-go@v4 (#157)
5b7ee17 is described below
commit 5b7ee1731d036b5aac68f8bd3fc9e6f98ada082e
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Tue Mar 28 14:01:37 2023 +0800
Leverage the built-in cache in setup-go@v4 (#157)
---
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