Ignore rpm and man pages #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build RPM | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: rockylinux:9-minimal | |
steps: | |
- name: Install prerequirements | |
run: microdnf install -y selinux-policy-devel tar findutils rpm-build | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Build SELinux policy | |
run: make -f /usr/share/selinux/devel/Makefile flexnet.pp | |
- name: Generate man page of SELinux policy | |
run: | | |
/usr/sbin/semodule -i flexnet.pp | |
sepolicy manpage -p . -d flexnet_t | |
- name: Build RPM | |
run: | | |
pwd=$(pwd) | |
rpmbuild --define "_sourcedir ${pwd}" --define "_specdir ${pwd}" --define "_builddir ${pwd}" --define "_srcrpmdir ${pwd}" --define "_rpmdir ${pwd}" --define "_buildrootdir ${pwd}/.build" -ba flexnet_selinux.spec | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Binary RPM | |
path: ./noarch/*.rpm |