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/02/24 04:33:15 UTC

[skywalking-eyes] branch gha/dep created (now 21d4bba)

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

kezhenxu94 pushed a change to branch gha/dep
in repository https://gitbox.apache.org/repos/asf/skywalking-eyes.git


      at 21d4bba  gha: switch to composite running mode and set up cache

This branch includes the following new commits:

     new 21d4bba  gha: switch to composite running mode and set up cache

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[skywalking-eyes] 01/01: gha: switch to composite running mode and set up cache

Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 21d4bba11f174cda29074118dee0314da830234c
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Fri Feb 24 12:32:56 2023 +0800

    gha: switch to composite running mode and set up cache
---
 dependency/action.yml | 45 ++++++++++++++++++++++++++++++++++++---------
 header/action.yml     | 47 ++++++++++++++++++++++++++++++++++++-----------
 2 files changed, 72 insertions(+), 20 deletions(-)

diff --git a/dependency/action.yml b/dependency/action.yml
index 16d273a..0b91f28 100644
--- a/dependency/action.yml
+++ b/dependency/action.yml
@@ -36,12 +36,39 @@ inputs:
     required: false
     default: check
 runs:
-  using: docker
-  image: ../Dockerfile
-  args:
-    - -v
-    - ${{ inputs.log }}
-    - -c
-    - ${{ inputs.config }}
-    - dependency
-    - ${{ inputs.mode }}
+  using: "composite"
+  steps:
+    - name: Set up Go 1.18
+      uses: actions/setup-go@v2
+      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-
+    - shell: bash
+      run: make -C $GITHUB_ACTION_PATH install
+    - shell: bash
+      env:
+        GITHUB_TOKEN: ${{ inputs.token }}
+      run: license-eye -v ${{ inputs.log }} -c ${{ inputs.config }} dependency ${{ inputs.mode }}
diff --git a/header/action.yml b/header/action.yml
index d33a37a..faa0874 100644
--- a/header/action.yml
+++ b/header/action.yml
@@ -42,14 +42,39 @@ inputs:
     required: false
     default: check
 runs:
-  using: docker
-  image: ../Dockerfile
-  env:
-    GITHUB_TOKEN: ${{ inputs.token }}
-  args:
-    - -v
-    - ${{ inputs.log }}
-    - -c
-    - ${{ inputs.config }}
-    - header
-    - ${{ inputs.mode }}
+  using: "composite"
+  steps:
+    - name: Set up Go 1.18
+      uses: actions/setup-go@v2
+      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-
+    - shell: bash
+      run: make -C $GITHUB_ACTION_PATH install
+    - shell: bash
+      env:
+        GITHUB_TOKEN: ${{ inputs.token }}
+      run: license-eye -v ${{ inputs.log }} -c ${{ inputs.config }} header ${{ inputs.mode }}