-
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
54 additions
and
0 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
.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,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 --init -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 |