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 e402a71
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build-rpm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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/
ls rpmbuild/SOURCES/
- name: Build RPM
run: |
pwd
ls rpmbuild/SOURCES/
rpmbuild -ba rpmbuild/SPECS/sos.spec

0 comments on commit e402a71

Please sign in to comment.