* Get an input value from environment variables or from GitHub Actions inputs * @param name - The name of the input variable. * @returns The input value as a string or undefined if not found.
(name: string)
| 22 | * @returns The input value as a string or undefined if not found. |
| 23 | */ |
| 24 | function getInput(name: string): string | undefined { |
| 25 | const envName = `INPUT_${name.replace(/-/g, "_").toUpperCase()}`; |
| 26 | return process.env[envName] || process.env[name] || undefined; |
| 27 | } |
| 28 | |
| 29 | /** |
| 30 | * Parse command-line arguments into an object. |