From 9a241d2fd483ea399d9e354a182774474ec4c02a Mon Sep 17 00:00:00 2001 From: imbajin Date: Sat, 10 Oct 2026 17:06:14 +0800 Subject: [PATCH 1/2] fix: include licenses in source archives - retain existing release docs in native Git archives - check source archive legal files in the license job - trigger Computer CI when archive rules change --- .gitattributes | 1 - .github/workflows/computer-ci.yml | 2 ++ .github/workflows/license-checker.yml | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 170b481e9..8fc75e552 100755 --- a/.gitattributes +++ b/.gitattributes @@ -8,4 +8,3 @@ .github/ export-ignore computer/computer-k8s-operator/crd-generate/bin/ export-ignore computer/computer-dist/scripts/ export-ignore -computer/computer-dist/release-docs/ export-ignore diff --git a/.github/workflows/computer-ci.yml b/.github/workflows/computer-ci.yml index 9164d3b49..f2bf8e0d0 100644 --- a/.github/workflows/computer-ci.yml +++ b/.github/workflows/computer-ci.yml @@ -6,10 +6,12 @@ on: - master - release-* paths: + - .gitattributes - computer/** - .github/workflows/computer-ci.yml pull_request: paths: + - .gitattributes - computer/** - .github/workflows/computer-ci.yml concurrency: diff --git a/.github/workflows/license-checker.yml b/.github/workflows/license-checker.yml index 66be588ce..b5187810d 100644 --- a/.github/workflows/license-checker.yml +++ b/.github/workflows/license-checker.yml @@ -29,6 +29,14 @@ jobs: log: info config: .licenserc.yaml + - name: Check source archive licenses + shell: bash + run: | + git -C .. archive HEAD | tar -tf - > "$RUNNER_TEMP/computer-source-files.txt" + grep -Fx 'computer/computer-dist/release-docs/LICENSE' "$RUNNER_TEMP/computer-source-files.txt" + grep -Fx 'computer/computer-dist/release-docs/NOTICE' "$RUNNER_TEMP/computer-source-files.txt" + grep -E '^computer/computer-dist/release-docs/licenses/(.*/)?LICENSE[^/]*$' "$RUNNER_TEMP/computer-source-files.txt" + - uses: actions/setup-java@v4 with: java-version: '17' From f7fda23dc2782ad31b5667c7274267823dd387cf Mon Sep 17 00:00:00 2001 From: imbajin Date: Sat, 10 Oct 2026 17:11:52 +0800 Subject: [PATCH 2/2] chore: wrap the archive license check - keep the license assertion within the code line limit - preserve the same native archive checks - retain explicit bash failure propagation --- .github/workflows/license-checker.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/license-checker.yml b/.github/workflows/license-checker.yml index b5187810d..3adc335e5 100644 --- a/.github/workflows/license-checker.yml +++ b/.github/workflows/license-checker.yml @@ -35,7 +35,8 @@ jobs: git -C .. archive HEAD | tar -tf - > "$RUNNER_TEMP/computer-source-files.txt" grep -Fx 'computer/computer-dist/release-docs/LICENSE' "$RUNNER_TEMP/computer-source-files.txt" grep -Fx 'computer/computer-dist/release-docs/NOTICE' "$RUNNER_TEMP/computer-source-files.txt" - grep -E '^computer/computer-dist/release-docs/licenses/(.*/)?LICENSE[^/]*$' "$RUNNER_TEMP/computer-source-files.txt" + grep -E '^computer/computer-dist/release-docs/licenses/(.*/)?LICENSE[^/]*$' \ + "$RUNNER_TEMP/computer-source-files.txt" - uses: actions/setup-java@v4 with: