Skip to content

Commit 53ae20d

Browse files
etchalonclaude
andcommitted
feat: Make secrets available as env vars during build step
Secrets from secrets-json are now exported alongside build-env and wrangler vars so they are available during the Nuxt build. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent fd8988e commit 53ae20d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ runs:
115115
# Start with user-provided build-env
116116
echo '${{ inputs.build-env }}' | jq -r 'to_entries | .[] | "export \(.key)=\"\(.value)\""' > /tmp/build-env.sh || true
117117
118+
# Also extract secrets-json as build env vars
119+
if [ -n '${{ inputs.secrets-json }}' ] && [ '${{ inputs.secrets-json }}' != '{}' ]; then
120+
echo "Extracting secrets for build..."
121+
echo '${{ inputs.secrets-json }}' | jq -r 'to_entries | .[] | "export \(.key)=\"\(.value)\""' >> /tmp/build-env.sh || true
122+
fi
123+
118124
# Also extract vars from wrangler environment file if it exists
119125
ENV_FILE="wrangler.${{ inputs.github-environment }}.jsonc"
120126
if [ -n "${{ inputs.github-environment }}" ] && [ -f "$ENV_FILE" ]; then

0 commit comments

Comments
 (0)