-
Notifications
You must be signed in to change notification settings - Fork 29
54 lines (43 loc) · 1.33 KB
/
fedora-latest-make-rpm-setup-run-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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 /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