From 10757df6829dba5e992c8eb10eff7eb547634dcd Mon Sep 17 00:00:00 2001 From: Daniel Colina Date: Thu, 15 Oct 2026 16:26:12 +0200 Subject: [PATCH] ci: read the Ubuntu runner version from UBUNTU_RUNNER_VERSION and refresh Node 20 actions Refs dotCMS/private-issues#740 --- .github/workflows/autodoc-executor.yml | 4 ++-- .github/workflows/bedrock-generic-executor.yml | 4 ++-- .github/workflows/bedrock-harness-executor.yml | 4 ++-- .github/workflows/claude-executor.yml | 6 +++--- .github/workflows/claude-orchestrator.yml | 6 +++--- .github/workflows/codex-executor.yml | 4 ++-- .github/workflows/deployment-guard.yml | 14 +++++++------- .github/workflows/tests.yml | 4 ++-- CLAUDE.md | 2 +- README.md | 2 +- examples/advanced-custom-triggers.yml | 8 ++++---- examples/consumer-repo-workflow.yml | 4 ++-- examples/infrastructure-consumer-workflow.yml | 4 ++-- 13 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.github/workflows/autodoc-executor.yml b/.github/workflows/autodoc-executor.yml index 951fffb..d586071 100644 --- a/.github/workflows/autodoc-executor.yml +++ b/.github/workflows/autodoc-executor.yml @@ -62,7 +62,7 @@ on: jobs: autodoc: - runs-on: ubuntu-latest + runs-on: ubuntu-${{ vars.UBUNTU_RUNNER_VERSION || '24.04' }} timeout-minutes: ${{ inputs.timeout_minutes }} permissions: contents: read @@ -105,7 +105,7 @@ jobs: - name: Upload report artifact if: always() - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.6.0 - https://github.com/actions/upload-artifact/releases/tag/v4.6.0 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 - https://github.com/actions/upload-artifact/releases/tag/v7.0.2 with: name: autodoc-report path: /tmp/autodoc-report.md diff --git a/.github/workflows/bedrock-generic-executor.yml b/.github/workflows/bedrock-generic-executor.yml index ca52cce..e8c2268 100644 --- a/.github/workflows/bedrock-generic-executor.yml +++ b/.github/workflows/bedrock-generic-executor.yml @@ -70,11 +70,11 @@ on: description: 'GitHub runner label' required: false type: string - default: 'ubuntu-latest' + default: '' jobs: review: - runs-on: ${{ inputs.runner }} + runs-on: ${{ inputs.runner || format('ubuntu-{0}', vars.UBUNTU_RUNNER_VERSION || '24.04') }} timeout-minutes: ${{ inputs.timeout_minutes }} permissions: id-token: write # OIDC -> STS diff --git a/.github/workflows/bedrock-harness-executor.yml b/.github/workflows/bedrock-harness-executor.yml index fcba74a..eb37189 100644 --- a/.github/workflows/bedrock-harness-executor.yml +++ b/.github/workflows/bedrock-harness-executor.yml @@ -127,11 +127,11 @@ on: description: 'GitHub runner label' required: false type: string - default: 'ubuntu-latest' + default: '' jobs: review: - runs-on: ${{ inputs.runner }} + runs-on: ${{ inputs.runner || format('ubuntu-{0}', vars.UBUNTU_RUNNER_VERSION || '24.04') }} timeout-minutes: ${{ inputs.timeout_minutes }} permissions: id-token: write # OIDC -> STS diff --git a/.github/workflows/claude-executor.yml b/.github/workflows/claude-executor.yml index 14acd10..038faa0 100644 --- a/.github/workflows/claude-executor.yml +++ b/.github/workflows/claude-executor.yml @@ -43,10 +43,10 @@ on: type: number default: 15 runner: - description: 'GitHub runner to use' + description: 'GitHub runner to use; empty uses ubuntu-UBUNTU_RUNNER_VERSION (default 24.04) from the calling repository variables' required: false type: string - default: 'ubuntu-latest' + default: '' provider: description: 'Anthropic provider: "anthropic-api" (direct Anthropic API, default) or "anthropic-bedrock" (Bedrock via OIDC)' required: false @@ -84,7 +84,7 @@ on: jobs: claude: - runs-on: ${{ inputs.runner }} + runs-on: ${{ inputs.runner || format('ubuntu-{0}', vars.UBUNTU_RUNNER_VERSION || '24.04') }} timeout-minutes: ${{ inputs.timeout_minutes }} permissions: contents: write diff --git a/.github/workflows/claude-orchestrator.yml b/.github/workflows/claude-orchestrator.yml index d23b018..45f3879 100644 --- a/.github/workflows/claude-orchestrator.yml +++ b/.github/workflows/claude-orchestrator.yml @@ -44,10 +44,10 @@ on: type: number default: 15 runner: - description: 'GitHub runner to use' + description: 'GitHub runner to use; empty uses ubuntu-UBUNTU_RUNNER_VERSION (default 24.04) from the calling repository variables' required: false type: string - default: 'ubuntu-latest' + default: '' enable_mention_detection: description: 'Enable automatic @claude mention detection for interactive mode' required: false @@ -176,7 +176,7 @@ jobs: ) ) ) - runs-on: ubuntu-latest + runs-on: ubuntu-${{ vars.UBUNTU_RUNNER_VERSION || '24.04' }} outputs: # One JSON array per executor — each entry is a model that routes there. # An executor job runs once per entry via strategy.matrix (or is skipped when '[]'). diff --git a/.github/workflows/codex-executor.yml b/.github/workflows/codex-executor.yml index 927cc55..7293669 100644 --- a/.github/workflows/codex-executor.yml +++ b/.github/workflows/codex-executor.yml @@ -128,11 +128,11 @@ on: description: 'GitHub runner label' required: false type: string - default: 'ubuntu-latest' + default: '' jobs: review: - runs-on: ${{ inputs.runner }} + runs-on: ${{ inputs.runner || format('ubuntu-{0}', vars.UBUNTU_RUNNER_VERSION || '24.04') }} timeout-minutes: ${{ inputs.timeout_minutes }} permissions: id-token: write # OIDC -> STS diff --git a/.github/workflows/deployment-guard.yml b/.github/workflows/deployment-guard.yml index 0dab6c2..2580d77 100644 --- a/.github/workflows/deployment-guard.yml +++ b/.github/workflows/deployment-guard.yml @@ -66,7 +66,7 @@ permissions: jobs: check-org-membership: name: Check Organization Membership - runs-on: ubuntu-latest + runs-on: ubuntu-${{ vars.UBUNTU_RUNNER_VERSION || '24.04' }} outputs: is-org-member: ${{ steps.check.outputs.is_member }} pr-author: ${{ steps.check.outputs.author }} @@ -75,7 +75,7 @@ jobs: steps: - name: Check if PR author is organization member id: check - uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 - https://github.com/actions/github-script/releases/tag/v7.1.0 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - https://github.com/actions/github-script/releases/tag/v9.0.0 with: script: | const trustedOrg = '${{ inputs.trusted_organization }}'; @@ -166,7 +166,7 @@ jobs: validate-changed-files: name: Validate Changed Files - runs-on: ubuntu-latest + runs-on: ubuntu-${{ vars.UBUNTU_RUNNER_VERSION || '24.04' }} needs: check-org-membership if: | inputs.enable_file_allowlist && @@ -253,7 +253,7 @@ jobs: validate-image-only-changed: name: Validate Only Image Changed - runs-on: ubuntu-latest + runs-on: ubuntu-${{ vars.UBUNTU_RUNNER_VERSION || '24.04' }} needs: [check-org-membership, validate-changed-files] if: | always() && @@ -383,7 +383,7 @@ jobs: validate-images: name: Validate Images - runs-on: ubuntu-latest + runs-on: ubuntu-${{ vars.UBUNTU_RUNNER_VERSION || '24.04' }} needs: [check-org-membership, validate-image-only-changed] if: | always() && @@ -626,7 +626,7 @@ jobs: finalize: name: Final Status - runs-on: ubuntu-latest + runs-on: ubuntu-${{ vars.UBUNTU_RUNNER_VERSION || '24.04' }} needs: [check-org-membership, validate-changed-files, validate-image-only-changed, validate-images] if: always() steps: @@ -745,7 +745,7 @@ jobs: - name: Create PR comment if: github.event_name == 'pull_request' - uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 - https://github.com/actions/github-script/releases/tag/v7.1.0 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - https://github.com/actions/github-script/releases/tag/v9.0.0 with: script: | const shouldBypass = '${{ needs.check-org-membership.outputs.should-bypass }}' === 'true'; diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c81192a..6c6cb66 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ on: jobs: github-actions-lint: name: Lint GitHub Actions Workflows with actionlint (docker) - runs-on: ubuntu-latest + runs-on: ubuntu-${{ vars.UBUNTU_RUNNER_VERSION || '24.04' }} permissions: contents: read steps: @@ -21,7 +21,7 @@ jobs: workflow-validation: name: Workflow Validation - runs-on: ubuntu-latest + runs-on: ubuntu-${{ vars.UBUNTU_RUNNER_VERSION || '24.04' }} steps: - name: Checkout code uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - https://github.com/actions/checkout/releases/tag/v7.0.1 diff --git a/CLAUDE.md b/CLAUDE.md index 80a88e4..4962f9b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -354,7 +354,7 @@ Sophisticated version comparison supporting dotCMS format: `YY.MM.DD[-REBUILD][_ ### Claude Workflows - **Timeout**: 15 minutes -- **Runner**: ubuntu-latest +- **Runner**: `ubuntu-` plus the calling repository's `UBUNTU_RUNNER_VERSION` variable (`24.04` when unset) - **Default Tools**: `git status` and `git diff` - **Mention Detection**: Case-insensitive @claude in comments, reviews, issues, and PRs - **Concurrency**: Consumer repositories should implement concurrency control to prevent duplicate runs diff --git a/README.md b/README.md index 43ca7cf..39233aa 100644 --- a/README.md +++ b/README.md @@ -292,7 +292,7 @@ jobs: | `direct_prompt` | Custom prompt for automatic mode | No | - | | `allowed_tools` | Custom allowed tools configuration | No | `Bash(git status)`
`Bash(git diff)` | | `timeout_minutes` | Timeout for Claude execution | No | 15 | -| `runner` | GitHub runner to use | No | ubuntu-latest | +| `runner` | GitHub runner to use | No | `ubuntu-` plus `vars.UBUNTU_RUNNER_VERSION` of the calling repository, `24.04` when unset | | `enable_mention_detection` | Enable built-in @claude mention detection | No | true | | `skip_automatic_when_mentioned` | Skip automatic mode when PR title/body contains @claude | No | true | | `custom_trigger_condition` | Custom condition to override default detection | No | - | diff --git a/examples/advanced-custom-triggers.yml b/examples/advanced-custom-triggers.yml index e5095a2..e1346e4 100644 --- a/examples/advanced-custom-triggers.yml +++ b/examples/advanced-custom-triggers.yml @@ -43,7 +43,7 @@ jobs: ) claude_args: '--allowedTools "Bash(git status),Bash(git diff)"' timeout_minutes: 10 - runner: ubuntu-latest + runner: ubuntu-${{ vars.UBUNTU_RUNNER_VERSION || '24.04' }} enable_mention_detection: false # Disable default @claude detection since we have custom logic secrets: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} @@ -69,7 +69,7 @@ jobs: - Impact on existing functionality claude_args: '--allowedTools "Bash(git status),Bash(git diff),Bash(grep -r \"config\" .)"' timeout_minutes: 15 - runner: ubuntu-latest + runner: ubuntu-${{ vars.UBUNTU_RUNNER_VERSION || '24.04' }} enable_mention_detection: false secrets: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} @@ -100,7 +100,7 @@ jobs: - Impact on existing security controls claude_args: '--allowedTools "Bash(git status),Bash(git diff)"' timeout_minutes: 20 - runner: ubuntu-latest + runner: ubuntu-${{ vars.UBUNTU_RUNNER_VERSION || '24.04' }} enable_mention_detection: false secrets: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} @@ -113,7 +113,7 @@ jobs: # No custom condition - will use default @claude mention detection claude_args: '--allowedTools "Bash(git status),Bash(git diff)"' timeout_minutes: 15 - runner: ubuntu-latest + runner: ubuntu-${{ vars.UBUNTU_RUNNER_VERSION || '24.04' }} enable_mention_detection: true # Use default @claude mention detection secrets: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} \ No newline at end of file diff --git a/examples/consumer-repo-workflow.yml b/examples/consumer-repo-workflow.yml index 8dcce54..e4c7697 100644 --- a/examples/consumer-repo-workflow.yml +++ b/examples/consumer-repo-workflow.yml @@ -52,7 +52,7 @@ jobs: trigger_mode: interactive claude_args: '--allowedTools "Bash(git status),Bash(git diff)"' timeout_minutes: 15 - runner: ubuntu-latest + runner: ubuntu-${{ vars.UBUNTU_RUNNER_VERSION || '24.04' }} enable_mention_detection: true # Uses built-in @claude mention detection # custom_trigger_condition: | # Optional: Override default mention detection # your custom condition here @@ -89,7 +89,7 @@ jobs: 🔴/🟠 are blocking; 🟡 is non-blocking. If the PR is clean, say so in one sentence. claude_args: '--allowedTools "Bash(git status),Bash(git diff)"' timeout_minutes: 15 - runner: ubuntu-latest + runner: ubuntu-${{ vars.UBUNTU_RUNNER_VERSION || '24.04' }} enable_mention_detection: false # No mention detection for automatic reviews # skip_automatic_when_mentioned: false # Optional: allow automatic mode even with @claude mention # custom_trigger_condition: | # Optional: Custom trigger logic diff --git a/examples/infrastructure-consumer-workflow.yml b/examples/infrastructure-consumer-workflow.yml index 479faad..eb992bb 100644 --- a/examples/infrastructure-consumer-workflow.yml +++ b/examples/infrastructure-consumer-workflow.yml @@ -61,7 +61,7 @@ jobs: trigger_mode: interactive claude_args: '--allowedTools "Bash(terraform validate),Bash(terraform plan),Bash(terraform fmt),Bash(terragrunt validate),Bash(terragrunt plan),Bash(terragrunt hclfmt),Bash(git status),Bash(git diff)"' timeout_minutes: 15 - runner: ubuntu-latest + runner: ubuntu-${{ vars.UBUNTU_RUNNER_VERSION || '24.04' }} enable_mention_detection: true # Uses built-in @claude mention detection # custom_trigger_condition: | # Optional: Custom trigger logic # github.event_name == 'issues' && contains(github.event.issue.labels.*.name, 'infrastructure') @@ -101,7 +101,7 @@ jobs: 🔴/🟠 are blocking; 🟡 is non-blocking. If the PR is clean, say so in one sentence. claude_args: '--allowedTools "Bash(terraform validate),Bash(terraform plan),Bash(terraform fmt),Bash(terragrunt validate),Bash(terragrunt plan),Bash(terragrunt hclfmt),Bash(git status),Bash(git diff)"' timeout_minutes: 15 - runner: ubuntu-latest + runner: ubuntu-${{ vars.UBUNTU_RUNNER_VERSION || '24.04' }} enable_mention_detection: false # No mention detection for automatic reviews # skip_automatic_when_mentioned: false # Optional: allow automatic mode even with @claude mention # custom_trigger_condition: | # Optional: Custom logic for infrastructure changes