Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/aws-cdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,22 @@ jobs:
;;
esac

- name: Export extra environment variables
env:
EXTRA_VARS: ${{ vars.EXTRA_VARS }}
EXTRA_SECRETS: ${{ secrets.EXTRA_SECRETS }}
run: |
if [ -n "$EXTRA_VARS" ]; then
while IFS= read -r line; do
[ -n "$line" ] && echo "$line" | tr -d '\r' >> "$GITHUB_ENV"
done <<< "$EXTRA_VARS"
fi
if [ -n "$EXTRA_SECRETS" ]; then
while IFS= read -r line; do
[ -n "$line" ] && echo "$line" | tr -d '\r' >> "$GITHUB_ENV"
done <<< "$EXTRA_SECRETS"
fi

- name: Set CDK commands
id: parse-cdk-config
env:
Expand Down
8 changes: 8 additions & 0 deletions docs/aws-cdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ These should be configured in your GitHub Environment (or at the repository leve

> **Authentication:** Configure either static credentials (`AWS_ACCESS_KEY_ID` + `AWS_SECRET_ACCESS_KEY`) **or** OIDC (`AWS_ROLE_ARN`). The workflow auto-detects which method to use.

**Extras** — optional:

| Name | Type | Description |
|------|------|-------------|
| `EXTRA_VARS` | Variable | Additional non-secret environment variables to inject into the deploy step |
Comment thread
AdamJHall marked this conversation as resolved.
| `EXTRA_SECRETS` | Secret | Additional secret environment variables to inject into the deploy step |

Both extra fields accept multiline `KEY=VALUE` pairs — one per line. Use these for runtime configuration that varies per project, such as feature flags.

#### **Outputs**
| Name | Description |
Expand Down