diff --git a/.github/actions/update-version-durability/action.yml b/.github/actions/update-version-durability/action.yml index 803158ae1a2..84af3f8911e 100644 --- a/.github/actions/update-version-durability/action.yml +++ b/.github/actions/update-version-durability/action.yml @@ -2,6 +2,10 @@ name: Update Version Durability description: Update Version Durability page on Document360 inputs: + LTS_VERSIONS: + required: true + description: Comma separated list of LTS versions + type: string GH_TOKEN: required: true description: GitHub API Token diff --git a/.github/actions/update-version-durability/index.js b/.github/actions/update-version-durability/index.js index b05b9e9ca76..2065ac66608 100644 --- a/.github/actions/update-version-durability/index.js +++ b/.github/actions/update-version-durability/index.js @@ -12,6 +12,7 @@ import { Octokit } from '@octokit/rest'; const D360_TOKEN = core.getInput('D360_TOKEN'); const D360_ARTICLE_ID = core.getInput('D360_ARTICLE_ID'); const PUBLISH = core.getInput('PUBLISH') === 'true'; +const LTS_VERSIONS = (core.getInput('LTS_VERSIONS') || '7.10').split(',').map((v) => v.trim()); const octokit = new Octokit({ auth: core.getInput('GH_TOKEN'), @@ -79,6 +80,11 @@ async function generateTable({ owner, repo } = {}) { continue; } + // Mark LTS + if (LTS_VERSIONS.includes(`${currentVersion.major}.${currentVersion.minor}`)) { + release.lts = true; + } + index++; } @@ -97,7 +103,7 @@ async function generateTable({ owner, repo } = {}) { minorDate.setDate(1); supportDateStart = minorDate; supportDate = new Date(minorDate); - supportDate.setMonth(supportDate.getMonth() + (lts ? 6 : 6)); + supportDate.setMonth(supportDate.getMonth() + (lts ? 9 : 6)); releaseData.push({ release: { @@ -145,7 +151,7 @@ async function generateTable({ owner, repo } = {}) { const endOfLife = !release.extendedSupport ? 'TBD' : release.extendedSupport.end.toLocaleString('en', { month: 'short', year: "numeric" }); - const link = `${release.version} (${latestPatch.version})`; + const link = `${release.version}${release.lts ? " LTS" : ""} (${latestPatch.version})`; text.push( '', diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 569cdece7dd..7d94af3025d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -883,6 +883,8 @@ jobs: - docker-image-publish uses: ./.github/workflows/update-version-durability.yml + with: + LTS_VERSIONS: ${{ vars.LTS_VERSIONS }} secrets: CI_PAT: ${{ secrets.CI_PAT }} D360_TOKEN: ${{ secrets.D360_TOKEN }} diff --git a/.github/workflows/update-version-durability.yml b/.github/workflows/update-version-durability.yml index 4d3db0468c2..516e27a9f8e 100644 --- a/.github/workflows/update-version-durability.yml +++ b/.github/workflows/update-version-durability.yml @@ -3,6 +3,10 @@ name: Update Version Durability on: workflow_dispatch: workflow_call: + inputs: + LTS_VERSIONS: + required: false + type: string secrets: CI_PAT: required: true @@ -29,6 +33,7 @@ jobs: - name: Update Version Durability uses: ./.github/actions/update-version-durability with: + LTS_VERSIONS: ${{ inputs.LTS_VERSIONS != '' && inputs.LTS_VERSIONS || vars.LTS_VERSIONS }} GH_TOKEN: ${{ secrets.CI_PAT }} D360_TOKEN: ${{ secrets.D360_TOKEN }} D360_ARTICLE_ID: 800f8d52-409d-478d-b560-f82a2c0eb7fb