| 1 |
#! /bin/sh |
| 2 |
|
| 3 |
generate_secure_token() { |
| 4 |
echo head --bytes 64 /dev/urandom | sha512sum --binary | cut --fields 1 --delimiter ' ' |
| 5 |
} |
| 6 |
|
| 7 |
dump_log () { |
| 8 |
if [ -s "$1" ]; then |
| 9 |
stop_command_token="$(generate_secure_token)" |
| 10 |
echo "::group::$1" |
| 11 |
echo "::stop-commands::$stop_command_token" |
| 12 |
cat "$1" |
| 13 |
echo "::$stop_command_token::" |
| 14 |
echo '::endgroup::' |
| 15 |
unset stop_command_token |
| 16 |
fi |
| 17 |
} |
| 18 |
|
| 19 |
dump_log config.log |
| 20 |
find . -name 'test-suite*.log' -printf '%P\n' | while read -r ts; do |
| 21 |
dump_log "$ts" |
| 22 |
done |