Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

make number of versions we patch nightly configurable (#82766)

Chris Vandoodewaard1d5c08b71d2e
diff --git a/.github/workflows/schedule-patch.yml b/.github/workflows/schedule-patch.yml
index 41cb09b8a2a..9cde89699d3 100644
--- a/.github/workflows/schedule-patch.yml
+++ b/.github/workflows/schedule-patch.yml
@@ -14,14 +14,17 @@ jobs:
runs-on: ${{ vars.SLIM_RUNNER_KEY }}
timeout-minutes: 5
steps:
- - name: Dispatch patch release for the current and previous major
+ - name: Dispatch patch release for the current and recent majors
uses: actions/github-script@v9
with:
script: | # js
- // Nightly patches cover the current supported major and the one
- // before it. release-auto.yml releases one major per dispatch.
+ const autoPatchVersionsCount = Number('${{ vars.AUTO_PATCH_VERSIONS_COUNT }}') || 0;
const currentRelease = Number('${{ vars.CURRENT_VERSION }}');
- const majors = [currentRelease];
+ // [currentRelease, currentRelease - 1, ..., currentRelease - autoPatchVersionsCount]
+ const majors = Array.from(
+ { length: autoPatchVersionsCount + 1 },
+ (_, i) => currentRelease - i,
+ );
await Promise.all(majors.map(version =>
github.rest.actions.createWorkflowDispatch({