MCPcopy Create free account
hub / github.com/github/gh-aw / GenerateNodeJsSetupStep

Function GenerateNodeJsSetupStep

pkg/workflow/nodejs.go:18–26  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

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
18func 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

Calls 1

getActionPinFunction · 0.85

Tested by 1