Skip to content

Commit 54fbb6c

Browse files
authored
update (#12)
1 parent c05c241 commit 54fbb6c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

action.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@ runs:
2424
- id: settings
2525
shell: bash
2626
run: |
27-
value=$(atmos describe component \
27+
OUTPUT_FILE="${{ inputs.stack }}-${{ inputs.component }}.json"
28+
atmos describe component \
2829
${{ inputs.component }} \
2930
-s ${{ inputs.stack }} \
30-
--format json | \
31-
jq -rc --arg key ${{ inputs.settings-path }} \
32-
'.settings | getpath($key | split("."))' \
33-
)
34-
echo $value
31+
--format json \
32+
--file "$OUTPUT_FILE" || echo '{}' > "$OUTPUT_FILE"
33+
value=$(jq -rc --arg key ${{ inputs.settings-path }} '.settings | getpath($key | split("."))' "$OUTPUT_FILE")
3534
echo "value=$value" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)