GenerateNodeJsSetupStep creates a GitHub Actions step for setting up Node.js Returns a step that installs Node.js using the default version from constants.DefaultNodeVersion Caching is disabled by default to prevent cache poisoning vulnerabilities in release workflows
()
| 16 | // Returns a step that installs Node.js using the default version from constants.DefaultNodeVersion |
| 17 | // Caching is disabled by default to prevent cache poisoning vulnerabilities in release workflows |
| 18 | func GenerateNodeJsSetupStep() GitHubActionStep { |
| 19 | return GitHubActionStep{ |
| 20 | " - name: Setup Node.js", |
| 21 | " uses: " + getActionPin("actions/setup-node"), |
| 22 | " with:", |
| 23 | fmt.Sprintf(" node-version: '%s'", constants.DefaultNodeVersion), |
| 24 | " package-manager-cache: false", |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | // installStepsContainNodeSetup reports whether any of the provided steps is already |
| 29 | // a "Setup Node.js" step. Uses the same extractStepName matcher as |