Skip to content

Commit

Permalink
github-actions: make rpm & setup (fedora)
Browse files Browse the repository at this point in the history
Signed-off-by: Douglas Schilling Landgraf <[email protected]>
  • Loading branch information
dougsland committed Oct 27, 2024
1 parent 5b6b21d commit 0427618
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/fedora-latest-make-rpm-setup-run-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
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
options: --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro

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

- name: Install required tools and Podman
run: |
sudo dnf group install -y "Development Tools"
sudo dnf install -y make bzip2 grep sed podman rpm-build selinux-policy-devel selinux-policy container-selinux golang-github-cpuguy83-md2man hostname
- name: Build RPM
run: |
# Build the RPM package
make rpm
- name: Verify RPM Build Path
run: |
# Check if the RPM package is in the expected path
ls rpmbuild/RPMS/noarch/
- 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

0 comments on commit 0427618

Please sign in to comment.