# # SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. # SPDX-License-Identifier: BUSL-1.1 # name: Check license headers on: push: branches: - master - rc - 'lts-[0-9]+.[0-9]+' pull_request: branches: - master - rc - 'lts-[0-9]+.[0-9]+' workflow_dispatch: permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: check: name: Check license headers runs-on: ubuntu-24.04 timeout-minutes: 30 defaults: run: shell: bash steps: - name: Checkout with full history uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - name: Set up JDK uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 with: distribution: corretto java-version: 21 cache: maven - name: Check license headers run: | mkdir -p target/license-provenance ./check-license-headers.sh 2>&1 | tee target/license-provenance/console.log - name: Add findings to the job summary if: failure() && hashFiles('target/license-provenance/console.log') != '' run: | { echo '```' cat target/license-provenance/console.log echo '```' } >> "$GITHUB_STEP_SUMMARY" - name: Upload report if: failure() uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: license-provenance-report path: target/license-provenance/ retention-days: 14 if-no-files-found: ignore