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

Function writeEnvLine

actions/setup/js/action_setup_otlp.cjs:41–45  ·  view source on GitHub ↗

* Append a key=value line to a GitHub Actions file (GITHUB_OUTPUT or GITHUB_ENV) * if the file path is set and the value is truthy. * @param {string | undefined} filePath - Path to the output/env file * @param {string} key - The variable name * @param {string} value - The value to write * @para

(filePath, key, value, logLabel, fileLabel)

Source from the content-addressed store, hash-verified

39 * @param {string} fileLabel - Human-readable file name for the log (e.g. "GITHUB_OUTPUT")
40 */
41function writeEnvLine(filePath, key, value, logLabel, fileLabel) {
42 if (!filePath || !value) return;
43 appendFileSync(filePath, `${key}=${value}\n`);
44 console.log(`[otlp] ${logLabel} written to ${fileLabel}`);
45}
46
47/**
48 * @param {string} headers

Callers 1

runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected