diff --git a/.github/workflows/build-and-test-2.12.yml b/.github/workflows/build-and-test-2.12.yml index 3ecadc7e1d9f..00291fb37bcd 100644 --- a/.github/workflows/build-and-test-2.12.yml +++ b/.github/workflows/build-and-test-2.12.yml @@ -8,7 +8,7 @@ permissions: # added using https://github.com/step-security/secure-repo contents: read env: - MAVEN_CLI_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false --batch-mode + MAVEN_CLI_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dlicense.skip=true --batch-mode MAVEN_TEST_OPTS: -Dtest.fork.count=1 jobs: diff --git a/.github/workflows/build-and-test-2.13.yml b/.github/workflows/build-and-test-2.13.yml index 25fab2f11d0e..f4d0c7da7e17 100644 --- a/.github/workflows/build-and-test-2.13.yml +++ b/.github/workflows/build-and-test-2.13.yml @@ -8,7 +8,7 @@ permissions: # added using https://github.com/step-security/secure-repo contents: read env: - MAVEN_CLI_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false --batch-mode + MAVEN_CLI_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dlicense.skip=true --batch-mode MAVEN_TEST_OPTS: -Dtest.fork.count=1 jobs: diff --git a/.github/workflows/license-check.yml b/.github/workflows/license-check.yml new file mode 100644 index 000000000000..eb32a983c068 --- /dev/null +++ b/.github/workflows/license-check.yml @@ -0,0 +1,28 @@ +name: license-check + +on: + push: + pull_request: + +permissions: # added using https://github.com/step-security/secure-repo + contents: read + +env: + MAVEN_CLI_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false --batch-mode + MAVEN_TEST_OPTS: -Dtest.fork.count=1 + +jobs: + check-headers: + runs-on: ubuntu-latest + # avoid duplicate jobs on PRs from the main repo + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name + + steps: + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + - uses: actions/setup-java@3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98 # v3.10.0 + with: + distribution: 'temurin' + java-version: '11' + cache: 'maven' + - name: Run license check + run: mvn license:check $MAVEN_CLI_OPTS