Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
fawadasaurus authored Oct 30, 2023
1 parent 6a05b4c commit 6985956
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,16 @@ do
done

# Store the output in a variable and capture both stdout and stderr
output=$(wick registry push "$(basename "$manifest_path")" $tag_flags 2>error.log)
output=$(wick registry push "$(basename "$manifest_path")" $tag_flags 2>&1)

# Check the exit status of the wick command
if [[ $? -ne 0 ]]; then
echo "Error: wick command failed with output:" >&2
cat error.log >&2
# The wick command failed. Print the error output in GitHub Actions format.
echo "::error file=$manifest_path::wick command failed with output: $output"
exit 1
fi


# Process the output with your sequence of commands
processed_output=$(echo "$output" | grep 'reference' | grep -E '"(\S*)"' | cut -d '"' -f2 | head -1)
echo $processed_output
Expand Down

0 comments on commit 6985956

Please sign in to comment.