action.yml
1 name: "Print logs" 2 description: "Print the log files produced by ci/ci.sh" 3 runs: 4 using: "composite" 5 steps: 6 - shell: bash 7 run: | 8 # Print the log files produced by ci/ci.sh 9 10 # Helper functions 11 group() { 12 title=$1 13 echo "::group::$title" 14 } 15 endgroup() { 16 echo "::endgroup::" 17 } 18 cat_file() { 19 file=$1 20 group "$file" 21 cat "$file" 22 endgroup 23 } 24 25 # Print all *.log files 26 shopt -s nullglob 27 for file in *.log; do 28 cat_file "$file" 29 done 30 31 # Print environment 32 group "CI env" 33 env 34 endgroup