From ccf48afa5af80ecf99a3acd6c5b2c0bb40265130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Bl=C3=A4cker?= Date: Tue, 6 Aug 2024 11:48:18 +0700 Subject: [PATCH] test --- .github/workflows/checkAudit.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checkAudit.yml b/.github/workflows/checkAudit.yml index 017635f44..0e3e145c6 100644 --- a/.github/workflows/checkAudit.yml +++ b/.github/workflows/checkAudit.yml @@ -161,7 +161,7 @@ jobs: # make sure that audit log entry contains audit report path - if [ ! -f "$AUDIT_REPORT_PATH" ]; then + if [ -z "$AUDIT_REPORT_PATH" ]; then echo -e "\033[31mThe audit log entry for file $FILE contains invalid or no 'auditReportPath' information.\033[0m" echo -e "\033[31mThis github action cannot complete before the audit log is complete.\033[0m" echo -e "\033[31mAborting now.\033[0m" @@ -169,6 +169,15 @@ jobs: exit 1 fi + # make sure that a file exists at the audit report path + if [ ! -f "$AUDIT_REPORT_PATH" ]; then + echo -e "\033[31mCould not find an audit report in path $AUDIT_REPORT_PATH for contract "$FILENAME".\033[0m" + echo -e "\033[31mThis github action cannot complete before the audit report is uploaded to 'audit/reports/'.\033[0m" + echo -e "\033[31mAborting now.\033[0m" + echo "CONTINUE=false" >> $GITHUB_ENV + exit 1 + fi + # make sure that audit log entry contains audit report path if [ -z "$AUDIT_COMMIT_HASH" ]; then echo -e "\033[31mThe audit log entry for file $FILE contains invalid or no 'auditCommitHash' information.\033[0m" @@ -178,6 +187,8 @@ jobs: exit 1 fi + + # store the commit hash to check it in a following step COMMIT_HASHES="${COMMIT_HASHES} $AUDIT_COMMIT_HASH"