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