add comments #6
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: Sensu Release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download latest nagios plugins release | |
run: curl -sL https://api.github.com/repos/nagios-plugins/nagios-plugins/releases/latest | grep "browser_download_url" | cut -d ":" -f "2,3" | tr -d \" | wget -qi - | |
- name: Untar release | |
run: tar -xzvf nagios-plugins-*.tar.gz | |
- name: Do sensu stuff | |
run: | | |
# cd into latest release directory | |
cd nagios-plugins-*/ | |
pwd | |
# configure makefile | |
./configure | |
# build nagios plugins | |
make | |
# rename build directory to a sensu-approved name | |
mv plugins bin | |
# delete all non-executable files | |
find bin -type f ! -executable -delete | |
# tar the binaries | |
tar -czpvf sensu-nagios-plugins.tar.gz bin/ | |
# create sha512 sum | |
sha512sum sensu-nagios-plugins.tar.gz > sha512sum.txt | |
# move artifacts back to base directory for the release action to see them | |
mv sensu-nagios-plugins.tar.gz sha512sum.txt .. | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "sensu-nagios-plugins.tar.gz,sha512sum.txt" |