From 47234433a8b28e173cb40038a24a02a5a1af1413 Mon Sep 17 00:00:00 2001 From: Carlos Mogas da Silva Date: Wed, 4 Dec 2024 13:15:16 +0000 Subject: [PATCH] Add ability to not run %check commands --- action.yml | 4 ++++ entrypoint.sh | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 98bedc3..1fc4e51 100644 --- a/action.yml +++ b/action.yml @@ -12,6 +12,10 @@ inputs: description: "Target arch to build the package" required: true default: "x86_64" + nocheck: + description: "Don't run %check commands" + required: false + default: false outputs: rpm: diff --git a/entrypoint.sh b/entrypoint.sh index 3665443..0277bec 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,6 +3,7 @@ SPEC=${INPUT_SPEC} SYSTEM=${INPUT_SYSTEM} ARCH=${INPUT_ARCH} +NOCHECK=${INPUT_NOCHECK} SPEC_NAME=$(basename ${SPEC}) CONFIGURATION="${SYSTEM}-${ARCH}" @@ -28,7 +29,11 @@ echo "::endgroup::" SRPM=$(grep Wrote result/build.log | cut -d" " -f 2) echo "::group::Building RPM" -mock -r "${SYSTEM}-${ARCH}" --resultdir result ${SRPM} +OPTS="" +if [ ${NOCHECK,,} == "true"]; then + OPTS="${OPTS} --nocheck" +fi +mock -r "${SYSTEM}-${ARCH}" --resultdir result ${OPTS} ${SRPM} if [ $? -ne 0 ]; then echo "::error Failed to build RPM" exit 1