File tree Expand file tree Collapse file tree 1 file changed +27
-4
lines changed
Expand file tree Collapse file tree 1 file changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -156,10 +156,33 @@ jobs:
156156
157157 - name : Build RPM package
158158 id : rpm
159- uses : alvarolopez/rpmbuild@rockylinux9
160- with :
161- source_file : dist/caso-${{ env.VERSION }}.tar.gz
162- spec_file : " packaging/redhat/caso.spec"
159+ run : |
160+ # Create RPM build environment in Docker
161+ docker run --rm \
162+ -v $PWD:/workspace \
163+ -w /workspace \
164+ rockylinux:9 \
165+ bash -c "
166+ # Install build dependencies
167+ dnf install -y rpm-build rpmdevtools python3-devel python3-setuptools python3-pbr python3-rpm-macros pyproject-rpm-macros
168+
169+ # Set up RPM build tree
170+ rpmdev-setuptree
171+
172+ # Copy spec file and source
173+ cp packaging/redhat/caso.spec ~/rpmbuild/SPECS/
174+ cp dist/caso-${{ env.VERSION }}.tar.gz ~/rpmbuild/SOURCES/
175+
176+ # Build RPM
177+ rpmbuild -ba --define 'version ${{ env.VERSION }}' ~/rpmbuild/SPECS/caso.spec
178+
179+ # Copy built RPMs to workspace
180+ mkdir -p /workspace/rpmbuild/RPMS
181+ mkdir -p /workspace/rpmbuild/SRPMS
182+ cp -r ~/rpmbuild/RPMS/* /workspace/rpmbuild/RPMS/ || true
183+ cp ~/rpmbuild/SRPMS/*.rpm /workspace/rpmbuild/SRPMS/ || true
184+ "
185+ echo "rpm_dir_path=$PWD/rpmbuild" >> $GITHUB_OUTPUT
163186
164187 - name : Update RPM artifacts to release
165188 if : github.event_name == 'release'
You can’t perform that action at this time.
0 commit comments