switched back to building pnp4nagios using BuildRequires #116
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: RPM Build | ||
on: push | ||
jobs: | ||
build-naemon-core: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: build Naemon core packages | ||
id: build | ||
uses: UCBoulder/oit-sepe-rpmbuild@master | ||
with: | ||
spec_file: "naemon-core.spec" | ||
additional_repos: '["epel-release"]' | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Naemon Core RPMs | ||
path: ${{ steps.build.outputs.rpm_dir_path }} | ||
build-naemon: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: build Naemon packages | ||
id: build | ||
uses: UCBoulder/oit-sepe-rpmbuild@master | ||
with: | ||
spec_file: "naemon.spec" | ||
additional_repos: '["epel-release"]' | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Naemon RPMs | ||
path: ${{ steps.build.outputs.rpm_dir_path }} | ||
build-naemon-livestatus: | ||
runs-on: ubuntu-latest | ||
needs: build-naemon-core | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: Naemon Core RPMs | ||
- name: build Naemon Livestatus packages | ||
id: build | ||
uses: UCBoulder/oit-sepe-rpmbuild@master | ||
with: | ||
spec_file: "naemon-livestatus.spec" | ||
additional_repos: '["epel-release", "/github/workspace/x86_64/libnaemon-1.4.2-0.x86_64.rpm", "/github/workspace/x86_64/naemon-devel-1.4.2-0.x86_64.rpm"]' | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Naemon Livestatus RPMs | ||
path: ${{ steps.build.outputs.rpm_dir_path }} | ||
build-naemon-vimvault: | ||
runs-on: ubuntu-latest | ||
needs: build-naemon-core | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: Naemon Core RPMs | ||
- name: build Naemon Vimvault packages | ||
id: build | ||
uses: UCBoulder/oit-sepe-rpmbuild@master | ||
with: | ||
spec_file: "naemon-vimvault.spec" | ||
additional_repos: '["epel-release", "/github/workspace/x86_64/libnaemon-1.4.2-0.x86_64.rpm", "/github/workspace/x86_64/naemon-devel-1.4.2-0.x86_64.rpm"]' | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Naemon Vimvault RPMs | ||
path: ${{ steps.build.outputs.rpm_dir_path }} | ||
build-merlin: | ||
runs-on: ubuntu-latest | ||
needs: build-naemon-core | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: Naemon Core RPMs | ||
- name: build Merlin packages | ||
id: build | ||
uses: UCBoulder/oit-sepe-rpmbuild@master | ||
with: | ||
spec_file: "merlin.spec" | ||
additional_repos: '["epel-release", "/github/workspace/x86_64/libnaemon-1.4.2-0.x86_64.rpm", "/github/workspace/x86_64/naemon-devel-1.4.2-0.x86_64.rpm"]' | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Merlin RPMs | ||
path: ${{ steps.build.outputs.rpm_dir_path }} | ||
build-libthruk: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: build Libthruk packages | ||
id: build | ||
uses: UCBoulder/oit-sepe-rpmbuild@master | ||
with: | ||
spec_file: "libthruk.spec" | ||
additional_repos: '["epel-release"]' | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Libthruk RPMs | ||
path: ${{ steps.build.outputs.rpm_dir_path }} | ||
build-thruk: | ||
runs-on: ubuntu-latest | ||
needs: build-libthruk | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: Libthruk RPMs | ||
- name: build Thruk packages | ||
id: build | ||
uses: UCBoulder/oit-sepe-rpmbuild@master | ||
with: | ||
spec_file: "thruk.spec" | ||
additional_repos: '["epel-release", "/github/workspace/x86_64/libthruk-3.00-0.x86_64.rpm"]' | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Thruk RPMs | ||
path: ${{ steps.build.outputs.rpm_dir_path }} | ||
build-pnp4nagios: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: sudo apt-get install -y rrdtool librrd-dev librrds-perl php-gd php-xml php-mbstring | ||
- name: build PNP4Nagios packages | ||
id: build | ||
uses: UCBoulder/oit-sepe-rpmbuild@master | ||
with: | ||
spec_file: "pnp4nagios.spec" | ||
additional_repos: '["epel-release"]' | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: PNP4Nagios RPMs | ||
path: ${{ steps.build.outputs.rpm_dir_path }} | ||
# fetch-pnp4nagios: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# | ||
# - name: Create x86_64 directory | ||
# run: mkdir -p x86_64 | ||
# | ||
# - name: Fetch PNP4Nagios RPM | ||
# run: curl -L -o x86_64/pnp4nagios-0.6.27-5.alma.el8.x86_64.rpm https://github.com/pnp4nagios/pnp4nagios/releases/download/v0.6.27-5/pnp4nagios-0.6.27-5.alma.el8.x86_64.rpm | ||
# | ||
# - name: debugging | ||
# run: | | ||
# if [ ! -f x86_64/pnp4nagios-0.6.27-5.alma.el8.x86_64.rpm ]; then | ||
# echo "Failed to download the PNP4Nagios RPM" | ||
# exit 1 | ||
# else | ||
# echo "PNP4Nagios RPM fetched successfully" | ||
# fi | ||
# - name: List files in the current directory | ||
# run: ls -la | ||
# | ||
# - name: Upload PNP4Nagios RPM as artifact | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: PNP4Nagios RPMs | ||
# path: ./x86_64/pnp4nagios-0.6.27-5.alma.el8.x86_64.rpm | ||
# if-no-files-found: error # This ensures it fails if the file isn't found | ||
publish-rpms: | ||
if: ${{ startsWith(github.ref, 'refs/tags/') }} | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build-naemon-core | ||
- build-naemon | ||
- build-naemon-livestatus | ||
- build-naemon-vimvault | ||
- build-libthruk | ||
- build-thruk | ||
- build-merlin | ||
- fetch-pnp4nagios | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
merge-multiple: true | ||
- name: List all files before release | ||
run: ls -R . | ||
- uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: 'x86_64/*,noarch/*,*.rpm' | ||