Add ability to not run %check commands
All checks were successful
Build docker image / build-and-publish (push) Successful in 3m0s
All checks were successful
Build docker image / build-and-publish (push) Successful in 3m0s
This commit is contained in:
parent
d6385ccfcf
commit
47234433a8
2 changed files with 10 additions and 1 deletions
|
@ -12,6 +12,10 @@ inputs:
|
||||||
description: "Target arch to build the package"
|
description: "Target arch to build the package"
|
||||||
required: true
|
required: true
|
||||||
default: "x86_64"
|
default: "x86_64"
|
||||||
|
nocheck:
|
||||||
|
description: "Don't run %check commands"
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
rpm:
|
rpm:
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
SPEC=${INPUT_SPEC}
|
SPEC=${INPUT_SPEC}
|
||||||
SYSTEM=${INPUT_SYSTEM}
|
SYSTEM=${INPUT_SYSTEM}
|
||||||
ARCH=${INPUT_ARCH}
|
ARCH=${INPUT_ARCH}
|
||||||
|
NOCHECK=${INPUT_NOCHECK}
|
||||||
|
|
||||||
SPEC_NAME=$(basename ${SPEC})
|
SPEC_NAME=$(basename ${SPEC})
|
||||||
CONFIGURATION="${SYSTEM}-${ARCH}"
|
CONFIGURATION="${SYSTEM}-${ARCH}"
|
||||||
|
@ -28,7 +29,11 @@ echo "::endgroup::"
|
||||||
SRPM=$(grep Wrote result/build.log | cut -d" " -f 2)
|
SRPM=$(grep Wrote result/build.log | cut -d" " -f 2)
|
||||||
|
|
||||||
echo "::group::Building RPM"
|
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
|
if [ $? -ne 0 ]; then
|
||||||
echo "::error Failed to build RPM"
|
echo "::error Failed to build RPM"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue