You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by ki...@apache.org on 2022/02/16 13:49:02 UTC

[incubator-seatunnel] branch dev updated: [Feature][ci] Correct the usage of maven cache in Github Action (#1260)

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

kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new addb1f4  [Feature][ci] Correct the usage of maven cache in Github Action (#1260)
addb1f4 is described below

commit addb1f45f0aab4a0028fb4d05fccc3c7f86d19e3
Author: Benedict Jin <as...@apache.org>
AuthorDate: Wed Feb 16 21:48:57 2022 +0800

    [Feature][ci] Correct the usage of maven cache in Github Action (#1260)
---
 .github/workflows/backend.yml | 7 +++++--
 .github/workflows/codeql.yaml | 7 +++++--
 .github/workflows/docker.yml  | 7 +++++--
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml
index cac03a5..5c6bdf3 100644
--- a/.github/workflows/backend.yml
+++ b/.github/workflows/backend.yml
@@ -51,10 +51,13 @@ jobs:
         with:
           java-version:  8
           distribution: 'adopt'
-      - uses: actions/cache@v2
+      - name: Cache local Maven repository
+        uses: actions/cache@v2
         with:
           path: ~/.m2/repository
-          key: ${{ runner.os }}-maven
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
       - name: Check Style
         run: |
           ./mvnw -T 2C -B checkstyle:check
diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml
index c5759ee..ba0797c 100644
--- a/.github/workflows/codeql.yaml
+++ b/.github/workflows/codeql.yaml
@@ -44,10 +44,13 @@ jobs:
         with:
           java-version:  8
           distribution: 'adopt'
-      - uses: actions/cache@v2
+      - name: Cache local Maven repository
+        uses: actions/cache@v2
         with:
           path: ~/.m2/repository
-          key: ${{ runner.os }}-maven
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
       - name: Initialize CodeQL
         uses: github/codeql-action/init@v1
         with:
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 85aae2f..dde27c0 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -42,10 +42,13 @@ jobs:
         with:
           java-version:  8
           distribution: 'adopt'
-      - uses: actions/cache@v2
+      - name: Cache local Maven repository
+        uses: actions/cache@v2
         with:
           path: ~/.m2/repository
-          key: ${{ runner.os }}-maven
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
       - name: Build and Package
         run: |
           ./mvnw -B package \