What are `$GITHUB_STATE` and `$RUNNER_TEMP` used for?
AdvancedConceptContexts, Expressions, Env & Outputs
Answer
$GITHUB_STATE lets a JavaScript action's main script pass values to its own post script (available as STATE_<name> env), for example a temporary directory to clean up or a cache key to save. $RUNNER_TEMP is a temp directory emptied at the start and end of each job; use it for kubeconfigs, credentials files and scratch data rather than $GITHUB_WORKSPACE, which may be uploaded as an artifact or persist on self-hosted runners.
More on Contexts, Expressions, Env & Outputs
List the available contexts and what each holds.BeginnerWhich contexts can you use in which keys? Give two examples that trip people up.AdvancedWhat are the expression operators and how do comparisons coerce types?IntermediateHow do you write a ternary in GitHub Actions expressions?IntermediateWhat do `contains`, `startsWith`, `endsWith`, `format` and `join` do?BeginnerWhat are object filters (`.*`) and how are they useful?Intermediate