From c9c660a0970294b2b4b9cf6902fc3e1c25a0f326 Mon Sep 17 00:00:00 2001 From: bthos Date: Fri, 13 Feb 2026 22:07:52 +0100 Subject: [PATCH 1/2] Rename validation command in package.json from `validate-all` to `validate-files` for clarity. Update README.md to reflect the new command and provide additional context on the validation process. Modify GitHub Actions workflow to clarify that changes to `registry.json` won't trigger the build workflow, preventing infinite loops. Signed-off-by: bthos --- .github/workflows/build-registry.yml | 23 ++--------------------- README.md | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-registry.yml b/.github/workflows/build-registry.yml index 6a1ca5a..c7929fc 100644 --- a/.github/workflows/build-registry.yml +++ b/.github/workflows/build-registry.yml @@ -7,8 +7,8 @@ on: paths: - 'plugins/**' - 'schemas/**' - paths-ignore: - - 'registry.json' + # Note: registry.json is in root and doesn't match these patterns, + # so changes to it won't trigger this workflow (preventing infinite loops) jobs: build: @@ -18,25 +18,6 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Check for registry.json modifications - run: | - echo "Checking if registry.json was modified in this PR..." - - # Get the base branch (main) - BASE_SHA=$(git merge-base origin/main HEAD) - - # Check if registry.json was modified between base and HEAD - if git diff --name-only $BASE_SHA HEAD | grep -q '^registry\.json$'; then - echo "::error::registry.json was modified in this PR. Please remove it from your commit." - echo "::error::CI automatically builds and commits registry.json after PR merge." - echo "::error::See CONTRIBUTING.md for details." - exit 1 - fi - - echo "✓ No registry.json modifications found" - name: Setup Node.js uses: actions/setup-node@v4 diff --git a/README.md b/README.md index 7a739b0..bba18d0 100644 --- a/README.md +++ b/README.md @@ -312,13 +312,13 @@ Validate the aggregated registry (requires registry.json to exist - run `npm run npm run validate ``` -Validate everything (schemas, plugins, and existing registry.json if present): +Validate existing files (schemas, plugins, and registry.json if present): ```bash npm run validate-files ``` -This runs: `validate-schemas` → `validate-plugins` → `validate` (skips registry validation if registry.json doesn't exist) +This runs: `validate-schemas` → `validate-plugins` → `validate` (skips registry validation if registry.json doesn't exist). Note: This does not build the registry - run `npm run build` first if you need to generate registry.json. Check for duplicate plugin IDs: diff --git a/package.json b/package.json index 726c11e..23a198e 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "validate": "node scripts/validate.js", "validate-plugins": "node scripts/validate-plugins.js", "validate-schemas": "node scripts/validate-schemas.js", - "validate-all": "npm run validate-schemas && npm run validate-plugins && npm run validate", + "validate-files": "npm run validate-schemas && npm run validate-plugins && npm run validate", "format": "node scripts/format.js", "check-duplicates": "node scripts/check-duplicates.js", "create-plugin": "node scripts/create-plugin.js", From 771e621969abd81d9735194adcaeff92a00e6ac6 Mon Sep 17 00:00:00 2001 From: bthos Date: Fri, 13 Feb 2026 22:10:42 +0100 Subject: [PATCH 2/2] Add manual trigger for registry rebuild in GitHub Actions workflow - Introduced `workflow_dispatch` to allow manual triggering of the registry rebuild from the GitHub Actions UI, enhancing flexibility in managing the workflow. Signed-off-by: bthos --- .github/workflows/build-registry.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-registry.yml b/.github/workflows/build-registry.yml index c7929fc..0ac99fb 100644 --- a/.github/workflows/build-registry.yml +++ b/.github/workflows/build-registry.yml @@ -9,6 +9,8 @@ on: - 'schemas/**' # Note: registry.json is in root and doesn't match these patterns, # so changes to it won't trigger this workflow (preventing infinite loops) + workflow_dispatch: + # Allows manual triggering of registry rebuild from GitHub Actions UI jobs: build: