From 24582c80460749b964e4d0450e8d9c1d59eb72ce Mon Sep 17 00:00:00 2001 From: Adel Bouhraoua Date: Thu, 3 Dec 2026 09:01:35 +0100 Subject: [PATCH 1/2] ci: exclude the release-please manifest from Prettier release-please rewrites it in its release PRs, where no git hooks run, so the format check failed on every release PR. --- .prettierignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.prettierignore b/.prettierignore index ec9780f..8414801 100644 --- a/.prettierignore +++ b/.prettierignore @@ -19,4 +19,7 @@ consent-lib/packages/apicuron-consent-wc/manifest.json .agents/skills/grill-me/ .agents/skills/grilling/ .claude/ + +# Written by release-please in its release PRs (no git hooks run there) CHANGELOG.md +.release-please-manifest.json From f695e274a90ca272750cf51e0e19a28f7793fb22 Mon Sep 17 00:00:00 2001 From: Adel Bouhraoua Date: Thu, 3 Dec 2026 09:16:56 +0100 Subject: [PATCH 2/2] ci: run project jobs only when their files change A `changes` job (dorny/paths-filter) gates api, dashboard, consent-lib, docs and server-image. Editing ci.yml runs everything; workflow_dispatch runs everything on demand. The repo job always runs. --- .github/workflows/ci.yml | 52 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78495a8..5350dfb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,8 @@ on: push: branches: [main] pull_request: + # Run every job regardless of what changed. + workflow_dispatch: concurrency: group: ci-${{ github.ref }} @@ -13,6 +15,46 @@ permissions: contents: read jobs: + # Which projects changed (whole PR vs its base; previous commit on main). + # The project jobs below only run when their files change; editing this + # workflow runs all of them. + changes: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + outputs: + api: ${{ steps.filter.outputs.api }} + dashboard: ${{ steps.filter.outputs.dashboard }} + consent-lib: ${{ steps.filter.outputs.consent-lib }} + docs: ${{ steps.filter.outputs.docs }} + server-image: ${{ steps.filter.outputs.server-image }} + steps: + - uses: actions/checkout@v4 + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + ci: &ci + - .github/workflows/ci.yml + api: + - *ci + - 'server/api/**' + dashboard: + - *ci + - 'server/dashboard/**' + consent-lib: + - *ci + - 'consent-lib/**' + docs: + - *ci + - 'docs/**' + server-image: + - *ci + - 'server/**' + - 'consent-lib/**' + - 'docker-bake.hcl' + # Formatting, markdown and links for the whole repository (root tooling). repo: runs-on: ubuntu-latest @@ -47,6 +89,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} api: + needs: changes + if: github.event_name == 'workflow_dispatch' || needs.changes.outputs.api == 'true' runs-on: ubuntu-latest defaults: run: @@ -79,6 +123,8 @@ jobs: - run: npm run build dashboard: + needs: changes + if: github.event_name == 'workflow_dispatch' || needs.changes.outputs.dashboard == 'true' runs-on: ubuntu-latest defaults: run: @@ -97,6 +143,8 @@ jobs: # Lint + Karma in the Node 16 image (same as `npm run lib:check`). consent-lib: + needs: changes + if: github.event_name == 'workflow_dispatch' || needs.changes.outputs.consent-lib == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -109,6 +157,8 @@ jobs: cache-to: type=gha,scope=consent-lib,mode=max docs: + needs: changes + if: github.event_name == 'workflow_dispatch' || needs.changes.outputs.docs == 'true' runs-on: ubuntu-latest defaults: run: @@ -126,6 +176,8 @@ jobs: # The production image (widget from consent-lib + dashboard + API); not pushed. server-image: + needs: changes + if: github.event_name == 'workflow_dispatch' || needs.changes.outputs.server-image == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4