Interview Prep/GitHub Actions/Contexts, Expressions, Env & Outputs

Why was `::set-output` deprecated, and what replaced it?

IntermediateConceptContexts, Expressions, Env & Outputs
Answer

::set-output name=x::value and ::set-env were parsed from stdout, so any process that could print to the log (for example, a test printing attacker-controlled input) could inject outputs or environment variables, including LD_PRELOAD or NODE_OPTIONS. They were replaced by environment files: $GITHUB_OUTPUT, $GITHUB_ENV, $GITHUB_PATH, $GITHUB_STATE, which only the step's own process writes. Old syntax prints a deprecation warning or is disabled.

All GitHub Actions questions Roadmap: GitHub Actions

More on Contexts, Expressions, Env & Outputs