Skip to content

ci: skip unneeded builds and update the trigger file from endoflife.date - #1121

Merged
viceice merged 2 commits into
mainfrom
viceice/ci/trigger-file
Dec 1, 2026
Merged

viceice merged 2 commits into
mainfrom
viceice/ci/trigger-file

Conversation

@viceice

@viceice viceice commented Dec 1, 2026

Copy link
Copy Markdown
Member

Changes

  • Split CI into build-pr and build-push, both calling the reusable build workflow, each with a required success job
  • Skip the build for drafts, ci:skip-build PRs and changes only to .github/build-skip-paths entries (changes action)
  • Add the weekly trigger-file workflow: drops EOL streams and adds new ones from endoflife.date (eol in builder.json), opens a PR with an app token and requests a review from @viceice
  • Same setup as ci: skip unneeded builds and update the trigger file from endoflife.date python-prebuild#1150

Context

  • This closes an existing Issue, Closes: #
  • This doesn't close an Issue, but I accept the risk that this PR may be closed if maintainers disagree with its opening or implementation

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI-generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

Use of AI in replying to PR comments

Who answers review comments:

  • @viceice will read and reply directly. Name the account.
  • An agent will draft replies and @username will read them before they are posted. Name the account.
  • An agent will draft replies and reply autonomously. This is heavily discouraged, and we prefer that there are humans in the loop
  • Nobody has explicitly committed to replying.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified tests

Drafted by Claude Code (Claude Opus 5.5, high effort) on behalf of @viceice.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <michael.kriese+claude-code@mend.io>
@qodo-code-review

qodo-code-review Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

ci: split build workflows, skip unneeded builds, add trigger-file sync

✨ Enhancement ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Splits the build into build-pr and build-push workflows, each calling the reusable build
 workflow and exposing a required success check.
• Skips the build for drafts, ci:skip-build labeled PRs, and PRs touching only paths in
 .github/build-skip-paths.
• Adds a weekly trigger-file workflow that syncs eol streams in builder.json from
 endoflife.date and opens a review-requested PR using an app token.
Merge Risk 🟡 Medium

Blast radius 🔴 High 💥 3 capabilities

  • 3 affected capabilities span independent functional scopes: CI validation, Ruby binary release management, Ruby release stream management.
  • The reusable build and caller success job jointly determine whether a pull request receives the required build result; they are one end-to-end validation behavior across workflow files.
  • The push/schedule caller and reusable matrix build together produce the repository's release-build behavior; they are distinct from pull-request validation because they publish main-branch or scheduled artifacts.
  • The scheduled/manual trigger workflow updates the release-stream trigger input, while builder.json supplies EOL metadata used to select streams.
  • Together they govern the bounded release-stream maintenance behavior rather than an application runtime feature.
Sources

.github/workflows/build.yml[86-93]

      - setup
      - lint
    # also run when lint was skipped on schedule; skipped for draft pull
    # requests and changes which don't need it, see `setup`
    if: |
      !cancelled() && !failure() &&
      github.event.pull_request.draft != true &&
      needs.setup.outputs.skip-build != 'true'

.github/workflows/build.yml[1-8]

name: build

# called by `build-pr.yml` and `build-push.yml`, which also hold the required
# `success` check
on:
  workflow_call:

# no workflow `permissions`: every job sets its own

builder.json[1-10]

{
  "image": "ruby",
  "depName": "ruby",
  "datasource": "ruby-version",
  "versioning": "ruby",
  "startVersion": "3.1.0",
  "ignoredVersions": [],
  "reverse": true,
  "eol": { "product": "ruby", "stream": "minor" }
}

.github/workflows/build-pr.yml[25-44]

  build:
    uses: ./.github/workflows/build.yml
    permissions:
      contents: write
      checks: write
      pull-requests: read

  # required check
  success:
    needs:
      - build
    runs-on: ubuntu-slim
    timeout-minutes: 1
    if: always()
    steps:
      - name: Fail for failed or cancelled build
        if: |
          needs.build.result == 'failure' ||
          needs.build.result == 'cancelled'
        run: exit 1

.github/workflows/build-push.yml[3-27]

on:
  push:
    # other branches are built by their pull request
    branches:
      - main
  merge_group:
  schedule:
    - cron: '0 1 * * *'

# pushes and scheduled runs on `main` publish releases, so they queue instead of
# cancelling each other; each run builds all missing releases
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: false

permissions:
  contents: read

jobs:
  build:
    uses: ./.github/workflows/build.yml
    permissions:
      contents: write
      checks: write
      pull-requests: read
Behavioral complexity 🟡 Medium 🧩 Interacting branches, Compatibility cases

  • Before, one workflow directly handled multiple event types, concurrency, and the required success job.
  • After, two caller workflows invoke a reusable workflow, while setup output, draft state, lint result, event type, and caller-level success handling interact.
  • New correctness conditions are that each event preserves its intended build/skip behavior and that skipped or cancelled reusable jobs still produce the required caller check result.
  • The extracted build matrix and lint branches are not themselves new complexity.
Sources

.github/workflows/build.yml[1-8]

name: build

# called by `build-pr.yml` and `build-push.yml`, which also hold the required
# `success` check
on:
  workflow_call:

# no workflow `permissions`: every job sets its own

.github/workflows/build.yml[86-93]

      - setup
      - lint
    # also run when lint was skipped on schedule; skipped for draft pull
    # requests and changes which don't need it, see `setup`
    if: |
      !cancelled() && !failure() &&
      github.event.pull_request.draft != true &&
      needs.setup.outputs.skip-build != 'true'

.github/workflows/build-pr.yml[25-44]

  build:
    uses: ./.github/workflows/build.yml
    permissions:
      contents: write
      checks: write
      pull-requests: read

  # required check
  success:
    needs:
      - build
    runs-on: ubuntu-slim
    timeout-minutes: 1
    if: always()
    steps:
      - name: Fail for failed or cancelled build
        if: |
          needs.build.result == 'failure' ||
          needs.build.result == 'cancelled'
        run: exit 1

.github/workflows/build-push.yml[3-27]

on:
  push:
    # other branches are built by their pull request
    branches:
      - main
  merge_group:
  schedule:
    - cron: '0 1 * * *'

# pushes and scheduled runs on `main` publish releases, so they queue instead of
# cancelling each other; each run builds all missing releases
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: false

permissions:
  contents: read

jobs:
  build:
    uses: ./.github/workflows/build.yml
    permissions:
      contents: write
      checks: write
      pull-requests: read

.github/build-skip-paths[1-7]

^renovate\.Dockerfile$
\.md$
^LICENSE$
^\.editorconfig$
^\.github/renovate\.json$
^\.github/build-skip-paths$
^\.github/zizmor\.yml$
Potential damage 🟡 Medium 🩹 Temporary loss

  • If routing or skip classification is wrong, a pull request can lose validation or receive an incorrect required-check outcome.
  • Reverting workflow files restores future checks; already merged code may require a later build or review action.
  • The check can be rerun or restored by reverting the workflow.
  • No repository data or external customer effect is established by these files alone.
Sources

.github/workflows/build.yml[86-93]

      - setup
      - lint
    # also run when lint was skipped on schedule; skipped for draft pull
    # requests and changes which don't need it, see `setup`
    if: |
      !cancelled() && !failure() &&
      github.event.pull_request.draft != true &&
      needs.setup.outputs.skip-build != 'true'

.github/workflows/build-pr.yml[25-44]

  build:
    uses: ./.github/workflows/build.yml
    permissions:
      contents: write
      checks: write
      pull-requests: read

  # required check
  success:
    needs:
      - build
    runs-on: ubuntu-slim
    timeout-minutes: 1
    if: always()
    steps:
      - name: Fail for failed or cancelled build
        if: |
          needs.build.result == 'failure' ||
          needs.build.result == 'cancelled'
        run: exit 1

.github/build-skip-paths[1-7]

^renovate\.Dockerfile$
\.md$
^LICENSE$
^\.editorconfig$
^\.github/renovate\.json$
^\.github/build-skip-paths$
^\.github/zizmor\.yml$
Assessed commit a4a1d49
Diagram

graph TD
  PR["build-pr.yml"] --> B["build.yml (reusable)"] --> S["setup: skip check"] --> L["lint"] --> M["build matrix"]
  PUSH["build-push.yml"] --> B
  PR --> OK["success check"]
  PUSH --> OK
  CRON["trigger-file.yml"] --> T["trigger-file command"] --> PRN["Pull request"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. dorny/paths-filter action instead of containerbase internal-tools changes
  • ➕ Widely used, well documented
  • ➕ Supports path filtering by pattern list directly in the workflow
  • ➖ Adds a third-party dependency not used by other containerbase repos
  • ➖ Would need its own pinning and maintenance; the skip-paths file would need to be translated
2. Single build workflow with paths-ignore and job-level if conditions
  • ➕ Fewer files to maintain
  • ➕ No need for a reusable workflow or separate success jobs
  • ➖ A workflow skipped by paths-ignore reports no status, which blocks required checks on PRs
  • ➖ Concurrency and permissions for push vs PR would still need to be split by conditions, making the file harder to read

Recommendation: The approach is sound. Splitting into two caller workflows with an always-run success job lets skipped builds still satisfy required checks, which a workflow-level paths-ignore cannot do. The org-internal changes action keeps the skip logic consistent with sibling containerbase repos. The main alternative is a third-party path filter, which would work but adds a dependency and diverges from the other repos. Consider verifying the skip paths with a dry run on a draft PR and a docs-only PR before merging, since code inspection is the only verification so far.

Files changed (7) +190 / -36

Enhancement (4) +177 / -35
build-pr.ymlNew PR build caller with required success check +44/-0

New PR build caller with required success check

• Triggers on PR open, sync, reopen, ready-for-review, draft conversion, and label changes. Calls the reusable build workflow with write permissions for contents, checks, and PRs. Adds a success job that fails only when build is failed or cancelled, so skipped builds pass. Uses a per-PR concurrency group that cancels in-progress runs.

.github/workflows/build-pr.yml

build-push.ymlNew push/schedule build caller for main +41/-0

New push/schedule build caller for main

• Triggers on pushes to main, merge groups, and a daily cron. Calls the reusable build workflow and adds the same success aggregation job. Uses a per-ref concurrency group with cancel-in-progress disabled so release publishing queues rather than cancelling.

.github/workflows/build-push.yml

build.ymlConverts build into reusable workflow with skip setup job +31/-35

Converts build into reusable workflow with skip setup job

• Replaces the direct triggers with workflow_call and removes the workflow-level permissions and concurrency, which move to the callers. Adds a setup job that runs the changes action and exposes skip-build. The build job is skipped for drafts and when skip-build is true. The old success job is removed because the callers now provide it.

.github/workflows/build.yml

trigger-file.ymlNew weekly workflow to sync EOL release streams +61/-0

New weekly workflow to sync EOL release streams

• Runs Mondays at 06:00 UTC and on manual dispatch. Runs the internal trigger-file command, which updates renovate.Dockerfile from endoflife.date. If changed, it creates an app token and opens a PR with the ci:skip-build label and @viceice as reviewer. Workflow permissions default to none and contents read is set per job.

.github/workflows/trigger-file.yml

Other (3) +13 / -1
build-skip-pathsAdds list of path regexes that skip PR builds +7/-0

Adds list of path regexes that skip PR builds

• New file with regex patterns matching files whose changes never need a build, such as Markdown, LICENSE, editorconfig, renovate config, and the skip-paths file itself. Read by the changes action in build.yml.

.github/build-skip-paths

zizmor.ymlDisables zizmor self-repository rule +4/-0

Disables zizmor self-repository rule

• Disables the self-repository audit rule so that the reusable workflow can be referenced with a local ./ path, as in other containerbase repositories.

.github/zizmor.yml

builder.jsonAdds eol config for ruby release streams +2/-1

Adds eol config for ruby release streams

• Adds an eol block with product ruby and stream minor. The trigger-file workflow uses it to fetch end-of-life data from endoflife.date for the ruby minor streams.

builder.json

@qodo-code-review

qodo-code-review Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

Grey Divider

Resolved findings
1. The build badge stops showing new runs ✓ Resolved Medium Bug

Resolving commit: a4a1d49

Resolution reason
The README build badge image URL and link were changed from build.yml to build-push.yml, preserving
the main branch filter, so the badge reflects the workflow that now runs directly on pushes to main.
Description
Changing build.yml to a workflow_call-only workflow leaves the README badge pointing at a
workflow that no longer runs directly. Pushes to main now run build-push.yml, so readers of the
README no longer see the current build status in that badge.

Grey Divider

Tip of the day
💡 Did you know, you can pick a display mode instead of tweaking every Display option by hand

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Co-Authored-By: Claude Opus 5.5 <michael.kriese+claude-code@mend.io>
@viceice
viceice added this pull request to the merge queue Dec 1, 2026
Merged via the queue into main with commit 90ff4bd Dec 1, 2026
7 of 8 checks passed
@viceice
viceice deleted the viceice/ci/trigger-file branch December 1, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant