Skip to content

Commit

Permalink
ci: build: print log files of failed tasks
Browse files Browse the repository at this point in the history
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
  • Loading branch information
hnez committed Aug 20, 2024
1 parent 52a51a9 commit 7e6d913
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,24 @@ jobs:
emmc-image \
emmc-boot-image \
tf-a-stm32mp
- name: Print logs of failed jobs
if: ${{ failure() }}
shell: python3 {0}
run: |
import os
PREFIX = 'ERROR: Logfile of failure stored in:'
for ln in open('build/tmp/log/cooker/lxatac/console-latest.log'):
if not ln.startswith(PREFIX):
continue
path = ln.removeprefix(PREFIX).strip()
shorter_path = path.removeprefix(os.getcwd()).strip('/')
print(f'::group::Contents of "{shorter_path}"')
print(open(path).read())
print('::endgroup::')
- name: Persist the disk image
env:
PERSISTENCE_TOKEN: ${{ secrets.PERSISTENCE_TOKEN }}
Expand Down

0 comments on commit 7e6d913

Please sign in to comment.