-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github-actions: make rpm & setup (fedora)
Signed-off-by: Douglas Schilling Landgraf <[email protected]>
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
.github/workflows/fedora-latest-make-rpm-setup-run-test.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Execute make rpm and install | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build_and_install_rpm: | ||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: fedora:latest # Use Fedora as the container for this job | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install required tools and Podman | ||
run: | | ||
dnf group install -y "Development Tools" | ||
dnf install -y make bzip2 grep sed podman rpm-build selinux-policy-devel selinux-policy container-selinux golang-github-cpuguy83-md2man | ||
- name: Build RPM | ||
run: | | ||
# Build the RPM package | ||
make rpm | ||
- name: Install RPM | ||
run: | | ||
# Install the generated RPM package | ||
sudo dnf install rpmbuild/RPMS/noarch/qm* -y | ||
- name: Run setup script | ||
run: | | ||
# Execute the setup script and check its return code | ||
/usr/share/qm/setup | ||
- name: Notify success | ||
if: success() | ||
run: echo "Setup completed successfully." | ||
|
||
- name: Notify failure | ||
if: failure() | ||
run: echo "Setup failed." && exit 1 |