display the runner logs on failure for debugging

This commit is contained in:
Earl Warren 2023-03-27 17:46:00 +02:00
parent d37076a4e9
commit c16405df52
No known key found for this signature in database
GPG Key ID: 0579CB2928A78A00
2 changed files with 3 additions and 1 deletions

View File

@ -12,6 +12,7 @@ jobs:
image-version: 1.19
- name: 001
run: |
export FORGEJO_RUNNER_LOGS="${{ steps.forgejo.outputs.runner-logs }}"
testdata/run.sh push_self http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }} testuser setup-forgejo-release
testdata/run.sh workflow http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }} testuser try-setup-forgejo-release
- name: 002

3
testdata/run.sh vendored
View File

@ -2,6 +2,7 @@
set -ex
: ${FORGEJO_RUNNER_LOGS:=../setup-forgejo/forgejo-runner.log}
DATA=$(dirname $0)
DIR=$(mktemp -d)
@ -32,7 +33,7 @@ function wait_success() {
sleep 5
done
if ! test "$(check_status "$forgejo" "$repo" "$sha")" = "success" ; then
cat forgejo-runner.log
cat $FORGEJO_RUNNER_LOGS
return 1
fi
}