File tree Expand file tree Collapse file tree
.github/actions/determineNodeVersions Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 shell : bash
3131 id : node-versions
3232 run : node "$GITHUB_ACTION_PATH/dist/index.js"
33- with :
34- nodeDisableVersions : ${{ inputs.nodeDisableVersions }}
33+ env :
34+ NODE_DISABLE_VERSIONS : ${{ inputs.nodeDisableVersions }}
3535
Original file line number Diff line number Diff line change @@ -25588,7 +25588,7 @@ const getVersions = async () => {
2558825588 const installedNode = process.versions.node;
2558925589 // Comma separated list of major versions to disable
2559025590 // For example: Set `NODE_DISABLE_VERSIONS` to `18,23`
25591- const disableVersions = (0,_actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput)('nodeDisableVersions'). split(',');
25591+ const disableVersions = process.env.NODE_DISABLE_VERSIONS?. split(',') || [] ;
2559225592 const today = new Date();
2559325593 // Build an array of versions that the current date is between the start and end dates
2559425594 const versions = Object.keys(json)
@@ -25598,7 +25598,7 @@ const getVersions = async () => {
2559825598 return today >= startDate && today <= endDate;
2559925599 })
2560025600 .map((version) => version.replace('v', ''))
25601- // Remove versions that are disabled via input (via env var)
25601+ // Remove versions that are disabled via env var
2560225602 .filter((version) => {
2560325603 if (disableVersions.includes(version)) {
2560425604 (0,_actions_core__WEBPACK_IMPORTED_MODULE_0__.notice)(`Node version ${version} is disabled via env var`);
Original file line number Diff line number Diff line change 55 * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66 */
77
8- import { setFailed , getInput , setOutput , notice } from '@actions/core' ;
8+ import { setFailed , setOutput , notice } from '@actions/core' ;
99
1010type VersionData = {
1111 start : string ;
@@ -32,7 +32,8 @@ export const getVersions = async () => {
3232
3333 // Comma separated list of major versions to disable
3434 // For example: Set `NODE_DISABLE_VERSIONS` to `18,23`
35- const disableVersions = getInput ( 'nodeDisableVersions' ) . split ( ',' ) ;
35+ const disableVersions = process . env . NODE_DISABLE_VERSIONS ?. split ( ',' ) || [ ] ;
36+
3637
3738 const today = new Date ( ) ;
3839
@@ -44,7 +45,7 @@ export const getVersions = async () => {
4445 return today >= startDate && today <= endDate ;
4546 } )
4647 . map ( ( version ) => version . replace ( 'v' , '' ) )
47- // Remove versions that are disabled via input (via env var)
48+ // Remove versions that are disabled via env var
4849 . filter ( ( version ) => {
4950 if ( disableVersions . includes ( version ) ) {
5051 notice ( `Node version ${ version } is disabled via env var` ) ;
You can’t perform that action at this time.
0 commit comments