From 4b6069bacae7f987c72a9a6ccf77f63056a9981d Mon Sep 17 00:00:00 2001 From: imbajin Date: Tue, 7 Feb 2023 23:59:45 +0800 Subject: [PATCH] chore: refactor the license check CI --- .github/workflows/check-dependencies.yml | 31 ----------------------- .github/workflows/ci.yml | 2 +- .github/workflows/license-checker.yml | 32 +++++++++++++++++++++--- .github/workflows/stale.yml | 2 +- 4 files changed, 30 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/check-dependencies.yml diff --git a/.github/workflows/check-dependencies.yml b/.github/workflows/check-dependencies.yml deleted file mode 100644 index fe8b2d55..00000000 --- a/.github/workflows/check-dependencies.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: third-party dependencies check - -on: - push: - branches: - - master - - /^release-.*$/ - pull_request: - -jobs: - build: - runs-on: ubuntu-latest - env: - SCRIPT_DEPENDENCY: hugegraph-dist/scripts/dependency - steps: - - name: Checkout source - uses: actions/checkout@v3 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'adopt' - - name: mvn install - run: | - mvn install -DskipTests=true - - name: generate current dependencies - run: | - bash $SCRIPT_DEPENDENCY/regenerate_known_dependencies.sh current-dependencies.txt - - name: check third dependencies - run: | - bash $SCRIPT_DEPENDENCY/check_dependencies.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2552479..0616bf88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: hugegraph-commons ci +name: "hugegraph-commons ci" on: push: diff --git a/.github/workflows/license-checker.yml b/.github/workflows/license-checker.yml index 2345f125..748a0755 100644 --- a/.github/workflows/license-checker.yml +++ b/.github/workflows/license-checker.yml @@ -1,15 +1,17 @@ -name: License checker +name: "license checker" on: push: branches: - master + - /^release-.*$/ pull_request: - branches: - - master + +concurrency: + cancel-in-progress: true jobs: - check-license: + check-license-header: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -32,3 +34,25 @@ jobs: mvn apache-rat:check -ntp find ./ -name rat.txt -print0 | xargs -0 -I file cat file > merged-rat.txt grep "Binaries" merged-rat.txt -C 3 && cat merged-rat.txt + + check-dependency-license: + runs-on: ubuntu-latest + env: + SCRIPT_DEPENDENCY: hugegraph-dist/scripts/dependency + steps: + - name: Checkout source + uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'adopt' + - name: mvn install + run: | + mvn install -DskipTests=true -ntp + - name: generate current dependencies + run: | + bash $SCRIPT_DEPENDENCY/regenerate_known_dependencies.sh current-dependencies.txt + - name: check third dependencies + run: | + bash $SCRIPT_DEPENDENCY/check_dependencies.sh \ No newline at end of file diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 1d7651bc..c38c7afe 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,4 +1,4 @@ -name: Mark stale issues and pull requests +name: "Mark stale issues and pull requests" on: schedule: