From 9988a59fc925fa8a1167ce5a7aa478855f3ae6e6 Mon Sep 17 00:00:00 2001 From: Chris Brown Date: Wed, 22 Jul 2026 17:17:55 +0100 Subject: [PATCH] Improve CI workflows across all three components Reduce unnecessary CI runs and modernize workflow configuration: - Add branch filters (push only on main) to prevent duplicate runs for PRs - Add path filters so each workflow only triggers for its own component - Add concurrency groups to cancel superseded runs - Pin Node.js 24 via actions/setup-node@v4 - Use local bundle-verifier (./bundle-verifier) instead of published @v1 tag - Remove redundant lint step from compile_test job (covered by lint job) Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci-action-io-generator.yml | 25 +++++++++++++++++--- .github/workflows/ci-commit-data.yml | 11 +++++++++ .github/workflows/verify-verifier.yml | 14 +++++++++++ 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-action-io-generator.yml b/.github/workflows/ci-action-io-generator.yml index 35f4778..f2e8ea5 100644 --- a/.github/workflows/ci-action-io-generator.yml +++ b/.github/workflows/ci-action-io-generator.yml @@ -2,7 +2,18 @@ name: action-io-generator CI on: push: + branches: [main] + paths: + - 'action-io-generator/**' + - '.github/workflows/ci-action-io-generator.yml' pull_request: + paths: + - 'action-io-generator/**' + - '.github/workflows/ci-action-io-generator.yml' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true defaults: run: @@ -15,6 +26,9 @@ jobs: steps: - uses: actions/checkout@v7 + - uses: actions/setup-node@v4 + with: + node-version: 24 - run: npm ci - run: npm run lint @@ -27,18 +41,21 @@ jobs: WORKDIR: "./action-io-generator" steps: - uses: actions/checkout@v7 + - uses: actions/setup-node@v4 + with: + node-version: 24 - name: Install working-directory: ${{ env.WORKDIR }} run: npm ci - name: Verify Latest Bundle - uses: redhat-actions/common/bundle-verifier@v1 + uses: ./bundle-verifier with: bundle_file: ${{ env.BUNDLE_FILE }} bundle_command: ${{ env.BUNDLE_COMMAND }} working_directory: ${{ env.WORKDIR }} - + compile_test: name: Compile and test runs-on: ubuntu-24.04 @@ -47,9 +64,11 @@ jobs: steps: - uses: actions/checkout@v7 + - uses: actions/setup-node@v4 + with: + node-version: 24 - run: npm ci - - run: npm run lint - run: npm run compile - run: npm run bundle diff --git a/.github/workflows/ci-commit-data.yml b/.github/workflows/ci-commit-data.yml index 60ae9fc..6eec8ad 100644 --- a/.github/workflows/ci-commit-data.yml +++ b/.github/workflows/ci-commit-data.yml @@ -1,7 +1,18 @@ name: commit-data CI on: push: + branches: [main] + paths: + - 'commit-data/**' + - '.github/workflows/ci-commit-data.yml' pull_request: + paths: + - 'commit-data/**' + - '.github/workflows/ci-commit-data.yml' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: commit_data: diff --git a/.github/workflows/verify-verifier.yml b/.github/workflows/verify-verifier.yml index f05f111..97d4bf3 100644 --- a/.github/workflows/verify-verifier.yml +++ b/.github/workflows/verify-verifier.yml @@ -1,7 +1,18 @@ name: bundle-verifier CI on: push: + branches: [main] + paths: + - 'bundle-verifier/**' + - '.github/workflows/verify-verifier.yml' pull_request: + paths: + - 'bundle-verifier/**' + - '.github/workflows/verify-verifier.yml' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true env: BUNDLE_FILE: "dist/index.js" @@ -15,6 +26,9 @@ jobs: steps: - uses: actions/checkout@v7 + - uses: actions/setup-node@v4 + with: + node-version: 24 - name: Install working-directory: ${{ env.WORKDIR }}