Allow specifying a build arch
Default x86_64
This commit is contained in:
+7
-2
@@ -5,6 +5,10 @@ inputs:
|
||||
specfile:
|
||||
description: The filename of the spec file to build. If not set and there is only 1 specfile, it will be selected automatically.
|
||||
required: false
|
||||
build_arch:
|
||||
description: Build architecture, default x86_64
|
||||
required: false
|
||||
default: x86_64
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
@@ -21,7 +25,8 @@ runs:
|
||||
microdnf builddep -y $SPECFILE
|
||||
echo Checking for missing builddeps
|
||||
counter=1
|
||||
until rpmbuild --undefine=_disable_source_fetch --define "_sourcedir $PWD" --define "_topdir $PWD" -bd $SPECFILE || [ $counter -gt 5 ]; do
|
||||
RPMBUILDARGS=(--target=${{ inputs.build_arch }} --define="_disable_source_fetch 0" --define "_sourcedir $PWD" --define "_topdir $PWD")
|
||||
until rpmbuild "${RPMBUILDARGS[@]}" -bd $SPECFILE || [ $counter -gt 5 ]; do
|
||||
echo Installing missing builddeps round $counter
|
||||
microdnf builddep -y SRPMS/$(rpmspec -q --srpm --qf '%{nevr}' $SPECFILE).buildreqs.nosrc.rpm
|
||||
((counter++))
|
||||
@@ -29,7 +34,7 @@ runs:
|
||||
echo RPM autospeccing
|
||||
rpmautospec process-distgit $SPECFILE $SPECFILE
|
||||
echo Building rpm and srpm
|
||||
rpmbuild --undefine=_disable_source_fetch --define "_sourcedir $PWD" --define "_topdir $PWD" -ba $SPECFILE
|
||||
rpmbuild "${RPMBUILDARGS[@]}" -ba $SPECFILE
|
||||
echo "Built $SPECFILE"
|
||||
branding:
|
||||
icon: "package"
|
||||
|
||||
Reference in New Issue
Block a user