You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2022/10/28 12:59:59 UTC

[skywalking-infra-e2e] 01/01: Improve GitHub Actions usability by using composite actions' new feature

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch gha
in repository https://gitbox.apache.org/repos/asf/skywalking-infra-e2e.git

commit d5f5c5bb93daf92c7f005a94f46e8da83f7def09
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Fri Oct 28 20:59:50 2022 +0800

    Improve GitHub Actions usability by using composite actions' new feature
---
 action.yaml | 36 ++++++++++++++++++++++++++++++++----
 1 file changed, 32 insertions(+), 4 deletions(-)

diff --git a/action.yaml b/action.yaml
index 37dbc01..ba80b89 100644
--- a/action.yaml
+++ b/action.yaml
@@ -28,11 +28,39 @@ inputs:
 runs:
   using: "composite"
   steps:
+    - name: Set up Go 1.18
+      uses: actions/setup-go@v2
+      with:
+        go-version: 1.18
+    - uses: actions/cache@v3
+      if: runner.os == 'Linux'
+      with:
+        path: |
+          ~/.cache/go-build
+          ~/go/pkg/mod
+        key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+        restore-keys: |
+          ${{ runner.os }}-go-
+    - uses: actions/cache@v3
+      if: runner.os == 'macOS'
+      with:
+        path: |
+          ~/Library/Caches/go-build
+          ~/go/pkg/mod
+        key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+        restore-keys: |
+          ${{ runner.os }}-go-
+    - uses: actions/cache@v3
+      if: runner.os == 'Windows'
+      with:
+        path: |
+          ~\AppData\Local\go-build
+          ~\go\pkg\mod
+        key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+        restore-keys: |
+          ${{ runner.os }}-go-
     - shell: bash
-      run: |
-        make -C $GITHUB_ACTION_PATH docker
-        docker run -v $(pwd):/tmp -w /tmp --entrypoint=sh docker.io/apache/e2e:latest -c "cp /usr/local/bin/e2e /tmp/e2e"
-        install ./e2e /usr/local/bin
+      run: make install DESTDIR=/usr/local/bin
     - name: E2E Dir Generator
       id: 'e2e-dir-generator'
       shell: bash