Fix RPM paths and final output
All checks were successful
Build docker image / build-and-publish (push) Successful in 5m35s
All checks were successful
Build docker image / build-and-publish (push) Successful in 5m35s
This commit is contained in:
parent
ddc40d0c20
commit
a13fce8a9d
1 changed files with 11 additions and 6 deletions
|
@ -10,6 +10,7 @@ SYSTEM=${INPUT_SYSTEM}
|
||||||
ARCH=${INPUT_ARCH}
|
ARCH=${INPUT_ARCH}
|
||||||
NOCHECK=${INPUT_NOCHECK}
|
NOCHECK=${INPUT_NOCHECK}
|
||||||
|
|
||||||
|
RESULT="rpms=["
|
||||||
|
|
||||||
for SPEC in ${SPECS[@]}; do
|
for SPEC in ${SPECS[@]}; do
|
||||||
SPEC_NAME=$(basename ${SPEC})
|
SPEC_NAME=$(basename ${SPEC})
|
||||||
|
@ -37,22 +38,26 @@ for SPEC in ${SPECS[@]}; do
|
||||||
fi
|
fi
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
SRPM=$(grep Wrote result/build.log | cut -d" " -f 2)
|
SRPM=$(grep Wrote result/build.log | cut -d ":" -f 2 | tr -d " " | xargs basename)
|
||||||
|
|
||||||
echo "::group::Building RPM"
|
echo "::group::Building RPM"
|
||||||
OPTS=""
|
OPTS=""
|
||||||
if [ ${NOCHECK,,} == "true"]; then
|
if [ ${NOCHECK,,} == "true" ]; then
|
||||||
OPTS="${OPTS} --nocheck"
|
OPTS="${OPTS} --nocheck"
|
||||||
fi
|
fi
|
||||||
mock -r "${SYSTEM}-${ARCH}" --resultdir result ${OPTS} ${SRPM}
|
mock -r "${SYSTEM}-${ARCH}" --resultdir result ${OPTS} result/${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
|
||||||
fi
|
fi
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
RPMS=i$(grep Wrote result/build.log | grep "/RPMS/" | cut -d" " -f 2)
|
RPMS=$(grep Wrote result/build.log | grep "/RPMS/" | cut -d" " -f 2 | xargs basename)
|
||||||
echo "::debug::rpms: ${RPMS}"
|
echo "::debug::built rpm: ${RPMS}"
|
||||||
echo "rpms=${RPMS}" >> ${GITHUB_OUTPUT}
|
RESULT="${RESULT},\"${RPMS}\""
|
||||||
cd -
|
cd -
|
||||||
done
|
done
|
||||||
|
|
||||||
|
RESULT="${RESULT/[,/[}]"
|
||||||
|
echo "::debug::final built rpms: ${RESULT}"
|
||||||
|
echo ${RESULT} >> ${GITHUB_OUTPUT}
|
||||||
|
|
Loading…
Reference in a new issue