Skip to content

Commit 63b4d0b

Browse files
committed
stringify output
1 parent e2efc45 commit 63b4d0b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

actions/get-resource/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ runs:
3939
run: |
4040
RESOURCE=$(ctrlc api get resource --id ${{ inputs.resource_id }})
4141
42-
echo "resource=$RESOURCE" >> "$GITHUB_OUTPUT"
42+
# JSON stringify the resource
43+
RESOURCE_STRING=$(echo "$RESOURCE" | jq -c '.')
44+
echo "resource=$RESOURCE_STRING" >> "$GITHUB_OUTPUT"
4345
4446
# Extract flattened key-value pairs and write to output
4547
echo "$RESOURCE" | jq -r 'paths(scalars) as $p | [ ( [ $p[] | tostring ] | join("_") | gsub("/"; "_") ), ( getpath($p) | tostring ) ] | join("=")' | while read -r line; do

0 commit comments

Comments
 (0)