diff --git a/compare_checks.py b/compare_checks.py index 3ef2452..208d7f9 100644 --- a/compare_checks.py +++ b/compare_checks.py @@ -47,7 +47,7 @@ def compare( if os.path.isfile(vetting_file): with open(vetting_file) as f: vetting_data = yaml.safe_load(f) - if len(vetting_data): + if len(vetting_data) == 0: if manual_checks: print( f"{BCOLORS.WARNING}{BCOLORS.BOLD}{vetting_file} is empty. You can initilize it with below yaml content." diff --git a/entrypoint.sh b/entrypoint.sh index 1d6e870..c27ec97 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -42,16 +42,14 @@ python3 /reporter.py $INPUT_RESULT_FILE test_exit_code=$? echo "::endgroup::" -if [ $test_exit_code != 0 ]; then - echo "::group::manual_checks" - python3 /compare_checks.py $INPUT_APP_VETTING $INPUT_RESULT_FILE - test_exit_code=$? - if [ $test_exit_code == 0 ]; then - echo "successful comparison, generating markdown" - echo "/export_to_markdown.py $INPUT_APP_VETTING $INPUT_MANUAL_CHECK_MARKDOWN" - python3 /export_to_markdown.py $INPUT_APP_VETTING $INPUT_MANUAL_CHECK_MARKDOWN - fi - echo "::endgroup::" +echo "::group::manual_checks" +python3 /compare_checks.py $INPUT_APP_VETTING $INPUT_RESULT_FILE +check_exit_code=$? +if [ $check_exit_code == 0 ]; then + echo "successful comparison, generating markdown" + echo "/export_to_markdown.py $INPUT_APP_VETTING $INPUT_MANUAL_CHECK_MARKDOWN" + python3 /export_to_markdown.py $INPUT_APP_VETTING $INPUT_MANUAL_CHECK_MARKDOWN fi +echo "::endgroup::" exit "$test_exit_code"