Build and Release DEB Package #18
Workflow file for this run
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: Build and Release DEB Package | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
jobs: | ||
build_and_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Debug: List files in repository | ||
run: ls -R | ||
- name: Install dependencies | ||
run: sudo apt-get update && sudo apt-get install -y dpkg-dev | ||
- name: Create directories for DEB packaging | ||
run: | | ||
mkdir -p nagios-plugins-ets-1.4/usr/lib64/nagios/plugins | ||
mkdir -p nagios-plugins-ets-1.4/DEBIAN | ||
- name: Copy control files | ||
run: | | ||
cp DEBIAN/control nagios-plugins-ets-1.4/DEBIAN/ | ||
cp DEBIAN/postinst nagios-plugins-ets-1.4/DEBIAN/ | ||
chmod 755 nagios-plugins-ets-1.4/DEBIAN/postinst | ||
- name: Copy plugin files | ||
run: | | ||
cp check_mem.c nagios-plugins-ets-1.4/check_mem.c | ||
cp -r usr/lib64/nagios/plugins/* nagios-plugins-ets-1.4/usr/lib64/nagios/plugins/ | ||
chmod 755 nagios-plugins-ets-1.4/usr/lib64/nagios/plugins/* | ||
- name: Build DEB package | ||
run: dpkg-deb --build nagios-plugins-ets-1.4 | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |