Repository navigation
feat(ci): expose the lifecycle helper as a GitHub Action - #5981
openshift-merge-bot[bot] merged 3 commits into
Conversation
Reviewers of the overlays change asked for an action instead of curling scripts/lifecycle.ts in each workflow. .github/actions/lifecycle sets up the current Node LTS and runs the script, so other repositories can call uses: redhat-developer/rhdh/.github/actions/lifecycle@main with command (active-branches, previous-y-stream, is-eol), an optional stream and repository-url, and read steps.<id>.outputs.result. is-eol reports true or false instead of an exit code; any other failure, including bad input, fails the step. A remote action is checked out with its whole repository, so it runs the script from the same ref. The E2E Tests workflow smoke-tests the action (previous-y-stream 99.0 must answer an X.Y stream). Midstream runs on GitLab and keeps fetching the script directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Pipeline controller notification This PR uses the pipeline controller for second-stage tests. Selection and triggering follow the repository configuration. Use |
Review: call redhat-developer/rhdh/.github/actions/lifecycle (rhdh#5981) like any other action rather than fetching scripts/lifecycle.ts with curl. The action sets up Node itself, so this workflow drops its setup-node step, and it only runs when no release-branch-pattern input is given. Needs redhat-developer/rhdh#5981 merged first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5981 +/- ##
==========================================
- Coverage 82.04% 78.41% -3.64%
==========================================
Files 71 64 -7
Lines 908 755 -153
Branches 139 122 -17
==========================================
- Hits 745 592 -153
Misses 162 162
Partials 1 1
*This pull request uses carry forward flags. Click here to find out more.
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Review: take Node from rhdh's .nvmrc instead of lts/*, so the action is upgraded together with the rest of the project. setup-node resolves an absolute node-version-file, so the action reads it from its own checkout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review suggestion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
/hold so that tide merges another PR first and doesn't get stuck here (will unhold in a minute) |
|
/unhold |
8406348
into
redhat-developer:main
…#5053) * Read supported release branches from the shared RHDH lifecycle helper (RHIDP-19630) Instead of another inline copy of the Product Life Cycles API check, fetch scripts/lifecycle.ts from redhat-developer/rhdh at a pinned commit and ask it for this repository's active release branches, keeping the three newest. The helper reads phase dates rather than the "type" field, which lags behind them: on 2026-11-09 the API still typed 1.10 "Full Support" and 1.9 "Maintenance Support" although both phases had ended on 2026-11-03. Today it selects release-1.10 and release-2.1, as the type-based check does. One difference: if the API is down, the helper keeps every branch, so this step keeps the three newest instead of failing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Send the no-supported-branches error to stderr Sonar: redirect this error message to stderr. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fetch the lifecycle helper from rhdh main and set up the current Node LTS Review: pulling the script from main picks up its fixes without a pin to bump; LIFECYCLE_REF still accepts a SHA to pin it. setup-node follows lts/* so a Node upgrade needs no change here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Use the rhdh lifecycle action instead of curling the script Review: call redhat-developer/rhdh/.github/actions/lifecycle (rhdh#5981) like any other action rather than fetching scripts/lifecycle.ts with curl. The action sets up Node itself, so this workflow drops its setup-node step, and it only runs when no release-branch-pattern input is given. Needs redhat-developer/rhdh#5981 merged first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Rename the release branch step to Compute Release Branches Review: it either reads the pattern override or computes the branches with the lifecycle helper. The step id stays, since the job outputs use it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>



Summary
Adds
.github/actions/lifecycle, a composite action aroundscripts/lifecycle.ts(#5962). Reviewers of the overlays change (redhat-developer/rhdh-plugin-export-overlays#5053) asked for an action instead ofcurling the script in each workflow.setup-nodewithlts/*) and runs the script from the same ref as the action, since a remote action is checked out with its whole repository.is-eolreportstrueorfalseinstead of an exit code. Any other failure, including bad input, fails the step with an::error::.Which issue(s) does this PR fix
Testing
previous-y-stream 99.0must answer anX.Ystream.active-branches→release-1.10 release-2.1 main,previous-y-stream 2.1→1.10,is-eol 1.9→true,is-eol 2.1→false, andis-eol 1.9.1and an unknown command fail with exit code 2.actionlintandprettierare clean;node --test scripts/lifecycle.test.tspasses (29).Merge Danger
Door: two-way
Blast radius: CI only (new action, no existing caller)
How to revert
git revertthe PR.🤖 Generated with Claude Code