Skip to content

Commit

Permalink
Add failure checks from formatting and posting outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
instantiator committed Feb 9, 2025
1 parent ea8cc9e commit b2a6db3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions format-thread/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ runs:
OUTPUT_FORMAT: ${{ inputs.output-format }}
run: |
export THREAD=$(./bin/Presence.SocialFormat.Console --networks $NETWORKS ${INPUT_FILE:+"--input-file" "$INPUT_FILE" } ${INPUT_FORMAT:+"--input-format" "$INPUT_FORMAT" } ${OUTPUT_FORMAT:+"--output-format" "$OUTPUT_FORMAT" })
echo "thread=$(echo $THREAD)" >> "$GITHUB_OUTPUT"
echo "format-response=$(echo $THREAD)" >> "$GITHUB_OUTPUT"
if [[ $(echo $THREAD | jq -r '.fullSuccess') != "true" ]]; then
exit 1
fi
outputs:
format-response:
description: "A formatted thread"
value: ${{ steps.format-thread.outputs.thread }}
value: ${{ steps.format-thread.outputs.format-response }}
7 changes: 5 additions & 2 deletions post-thread/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ runs:
CONFIG: ${{ inputs.config }}
run: |
export SUMMARY=$(echo ${THREAD} | ./bin/Presence.Posting.Console --json-config "${CONFIG}")
echo "summary=$(echo $SUMMARY)" >> "$GITHUB_OUTPUT"
echo "post-thread-summary=$(echo $SUMMARY)" >> "$GITHUB_OUTPUT"
if [[ $(echo $SUMMARY | jq -r '.FullSuccess') != "true" ]]; then
exit 1
fi
outputs:
post-thread-summary:
description: "A summary of posting activity"
value: ${{ steps.post-thread.outputs.summary }}
value: ${{ steps.post-thread.outputs.post-thread-summary }}

0 comments on commit b2a6db3

Please sign in to comment.