azd app env can print a service's resolved environment as dotenv, shell, or json. Running services in GitHub Actions needs a different shape: values appended to the $GITHUB_ENV file, with multiline values wrapped in heredoc syntax so they are parsed correctly.
Add --format github-actions that emits KEY=VALUE lines and, for values containing newlines, the KEY<<DELIM ... DELIM heredoc form that Actions expects. This lets a workflow do azd app env --service api --format github-actions >> "$GITHUB_ENV".
Acceptance criteria:
env --format github-actions prints single-line values as KEY=VALUE.
- Multiline values use a unique heredoc delimiter that does not collide with the content.
- Output works when appended to
$GITHUB_ENV.
- Unit tests cover single-line, multiline, and delimiter-collision handling.
- Documented in the CLI reference.
azd app envcan print a service's resolved environment as dotenv, shell, or json. Running services in GitHub Actions needs a different shape: values appended to the$GITHUB_ENVfile, with multiline values wrapped in heredoc syntax so they are parsed correctly.Add
--format github-actionsthat emitsKEY=VALUElines and, for values containing newlines, theKEY<<DELIM ... DELIMheredoc form that Actions expects. This lets a workflow doazd app env --service api --format github-actions >> "$GITHUB_ENV".Acceptance criteria:
env --format github-actionsprints single-line values asKEY=VALUE.$GITHUB_ENV.