Skip to content

Commit

Permalink
Add rpm build to git actions
Browse files Browse the repository at this point in the history
  • Loading branch information
filanov committed Jul 7, 2024
1 parent 27de925 commit 79ea773
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build-rpm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build RPM

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
container: rockylinux:8

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install RPM tools
run: |
dnf install -y rpm-build rpmdevtools gettext python3-devel
dnf install -y 'dnf-command(builddep)'
- name: Prepare build environment
run: |
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
cp sos.spec ~/rpmbuild/SPECS/
python3 setup.py sdist
cp dist/* ~/rpmbuild/SOURCES/
- name: Build RPM
run: |
rpmbuild -ba ~/rpmbuild/SPECS/sos.spec

0 comments on commit 79ea773

Please sign in to comment.