Skip to content

Commit

Permalink
chore(green-coding-solutions#7): surround if condition with quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
jreimone committed Apr 14, 2023
1 parent de4361c commit 26dab9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/data-json-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ jobs:
if [ '${{ steps.data-node-setup.outputs.data-lap-json }}' == '' ]; then
echo "Output must not be empty"; exit 1;
fi
if [ $(echo '${{ steps.data-node-setup.outputs.data-lap-json }}' | jq -e 'has("repository", "branch", "workflow", "run_id", "label", "cpu_avg_percent", "energy_joules", "power_avg_watts") | if . then 1 else 0 end') -eq 1 ]; then
if [ "$(echo '${{ steps.data-node-setup.outputs.data-lap-json }}' | jq -e 'has("repository", "branch", "workflow", "run_id", "label", "cpu_avg_percent", "energy_joules", "power_avg_watts") | if . then 1 else 0 end')" -eq 1 ]; then
echo "output has correct structure"
else
echo "output has wrong structure"
exit 1;
exit 1
fi
if [ $(echo '${{ steps.data-node-setup.outputs.data-lap-json }}' | jq -e '.label == "node setup" | if . then 1 else 0 end') -eq 1 ]; then
echo "value of 'label' is 'node setup'"
Expand Down

0 comments on commit 26dab9f

Please sign in to comment.