diff --git a/action.yaml b/action.yaml index 25b7bf3..9b0003e 100644 --- a/action.yaml +++ b/action.yaml @@ -21,20 +21,25 @@ runs: cd ${{ gitea.workspace }} SPECFILE=$([ "${{ inputs.specfile }}" ] && echo -n "${{ inputs.specfile }}" || echo -n $([ $(ls -1 *.spec 2>/dev/null| wc -l) -eq 1 ] && echo -n "$(ls -1 *.spec)")) [ "$SPECFILE" == "" ] && exit 1 + + echo RPM autospeccing + rpmautospec process-distgit $SPECFILE $SPECFILE + echo install_weak_deps=false >> /etc/dnf/dnf.conf microdnf builddep -y $SPECFILE + echo Checking for missing builddeps counter=1 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 + until rpmbuild "${RPMBUILDARGS[@]}" -br $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++)) done - echo RPM autospeccing - rpmautospec process-distgit $SPECFILE $SPECFILE + echo Building rpm and srpm rpmbuild "${RPMBUILDARGS[@]}" -ba $SPECFILE + echo "Built $SPECFILE" branding: icon: "package"