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 image-version: 1.19
- name: 001 - name: 001
run: | 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 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 testdata/run.sh workflow http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }} testuser try-setup-forgejo-release
- name: 002 - name: 002

3
testdata/run.sh vendored
View file

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