From c3aba10360cd760d149f636de7856f0299006913 Mon Sep 17 00:00:00 2001 From: Chris Earle Date: Tue, 17 Feb 2026 17:49:46 -0700 Subject: [PATCH] [NOTICE.txt] Trigger Check whenever it can change --- .github/workflows/check-notice.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check-notice.yml b/.github/workflows/check-notice.yml index 777ffb65..83839a89 100644 --- a/.github/workflows/check-notice.yml +++ b/.github/workflows/check-notice.yml @@ -2,29 +2,39 @@ name: Check NOTICE.txt on: pull_request: - paths: - - 'build.gradle.kts' - - 'NOTICE.template' - - 'NOTICE.txt' - - 'buildSrc/**' jobs: check-notice: runs-on: ubuntu-latest steps: + - uses: dorny/paths-filter@v3 + id: changes + with: + # If any of these files changed, then we may need to update the NOTICE.txt + filters: | + notice: + - 'build.gradle.kts' + - 'NOTICE.template' + - 'NOTICE.txt' + - 'buildSrc/**' + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 + if: steps.changes.outputs.notice == 'true' - name: Set up JDK 25 + if: steps.changes.outputs.notice == 'true' uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 with: + cache: gradle distribution: zulu java-version: '25' - cache: gradle - name: Generate NOTICE.txt + if: steps.changes.outputs.notice == 'true' run: ./gradlew generateLicenseReport - name: Check NOTICE.txt is up to date + if: steps.changes.outputs.notice == 'true' run: | if ! git diff --exit-code NOTICE.txt; then echo "::error::NOTICE.txt is out of date. Run './gradlew generateLicenseReport' and commit the result."