Skip to content

ci: run the package licence check on PRs - #26

Closed
juliusknorr wants to merge 1 commit into
mainfrom
ci/licence-metadata
Closed

juliusknorr wants to merge 1 commit into
mainfrom
ci/licence-metadata

Conversation

@juliusknorr

@juliusknorr juliusknorr commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Runs test/licence-metadata.sh on PRs and pushes to main, so a dropped licence term, a returning logo clause or a missing ONLYOFFICE origin notice fails CI.

  • Triggers on changes to the package templates (deb/, rpm/, common/) and to the files the script renders from: Makefile, NOTICE.m4, LICENSE, LICENSE-CC.txt, plus the script and the workflow itself
  • Hardening: contents: read, persist-credentials: false on the checkout, timeout-minutes: 5

Rebased onto main now that #25 (which adds the script) is merged, so the diff is only the workflow file. Base is main.

Tests: in ubuntu:24.04 with make and m4 the script passes on this tree, and fails with ::error::Euro-Office NOTICE lacks the ONLYOFFICE origin notice when "is not affiliated with" is changed in NOTICE.m4. actionlint reports no errors.

@juliusknorr
juliusknorr marked this pull request as ready for review November 5, 2026 21:31
@juliusknorr
juliusknorr requested a review from moodyjmz November 5, 2026 21:31
@juliusknorr juliusknorr added chore build Build process related changes packages labels Nov 11, 2026
@rikled

rikled commented Nov 11, 2026

Copy link
Copy Markdown
Member

Please add NOTICE.m4, Makefile, LICENSE and LICENSE-CC.txt to paths; the script reads them, so changes there currently skip the check.

Also rebase onto #25's head: the green run predates the NOTICE checks.

@moodyjmz moodyjmz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still targets fix/package-warranty-7a, but #25 merged into main on 11-16. Merging now would land the workflow on that branch, not main. Retargeting alone conflicts, because #25 was rebase-merged and this branch still carries its old commit: there's an add/add conflict on test/licence-metadata.sh. Rebase onto main so the diff is just the workflow file, then add the paths entries from the earlier comment.

Details
  • CI result is stale. The green check run is from 11-05, on the branch's pre-NOTICE copy of the script. It needs a fresh run after the rebase.
  • paths: agree with the earlier comment. Makefile, NOTICE.m4, LICENSE and LICENSE-CC.txt all feed the script (Makefile:400-401, :520). With the current filter, a PR that changes only NOTICE.m4 skips the check, even though that change fails it.
  • Script on main with this workflow: passes. Changing "is not affiliated with" in NOTICE.m4 fails with ::error::Euro-Office NOTICE lacks the ONLYOFFICE origin notice, as intended.
  • Workflow security is fine: it uses pull_request (not _target), contents: read, no secrets and no ${{ }} interpolation, and actions/checkout@de0fac2e… is the v6.0.2 tag commit.
  • Optional hardening: persist-credentials: false on the checkout, and timeout-minutes: 5 on the job.

Repro: in ubuntu:24.04 with make and m4, on main plus this workflow, run test/licence-metadata.sh.

Run test/licence-metadata.sh on PRs and pushes to main that touch the
package templates or the files the script renders from (Makefile,
NOTICE.m4, LICENSE, LICENSE-CC.txt). The checkout does not persist
credentials and the job times out after 5 minutes.

No-test: CI workflow, checked by running the script and actionlint
Signed-off-by: Julius Knorr <jus@bitgrid.net>
Assisted-by: ClaudeCode:claude-opus-5-5
@juliusknorr
juliusknorr changed the base branch from fix/package-warranty-7a to main December 3, 2026 19:50
@juliusknorr

Copy link
Copy Markdown
Member Author

@moodyjmz Thanks, and sorry this sat on the old base. Rebased onto main, so the diff is only the workflow file now, and retargeted to main. Added Makefile, NOTICE.m4, LICENSE and LICENSE-CC.txt to paths (also covers rikled's earlier comment), plus persist-credentials: false and timeout-minutes: 5. Same repro as yours: passes on the rebased tree, fails with the origin notice error when NOTICE.m4 is changed. A fresh CI run comes with the push.

@moodyjmz moodyjmz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve. The diff is now only the workflow on main, with the paths entries and checkout hardening in, and check passes at this head.

@juliusknorr

Copy link
Copy Markdown
Member Author

Superseded by #41, which landed .github/workflows/package-licence.yml on main with the same check. Closing.

@juliusknorr juliusknorr closed this Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Build process related changes chore packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants