Action Paniker - Stimulate your senses physically when your build fails 🚨
Hemanth Krishna
Posted on December 7, 2021
Action Paniker in Action
Motivation
Sometimes in OpenSource Projects that are huge, the deployment takes a lot of time, and we do not bother to keep waiting for that much amount of time to ensure that the build/release of our project has been successfully deployed.
Some OpenSource projects are critical, that is, the builds and release are very crucial and makes a great impact, if something goes wrong in these CI, the maintainer must be notified immediately.
Hence Action Paniker, it sits nicely on your desk, and it will light up and make alarm sounds stimulating your physical senses if your release or build fails, physically asking you to "Something went wrong! Please look into it ASAP!". Its the much wanted CODE-RED Bell that any maintainer team would want.
Flow of the Workflow
The flow of the workflow is simple:
GitHub action runs
If any step fails, the GitHub Action sends a CURL to the paniker at your desk and its going to light up and buzz simulating your physical senses and indicating your build/release has failed when you are away from your desk.
The steps are well defined in the Repository Readme, you need an RaspberryPi, LED and Buzzer and some cardboard as hardware components and ofc some patience!
The circuit diagram of how the Hardware is setup
An enclosed box of all the components
I am aware it doesn't look appealing, and its done intentionally, so that I can pray that my build/release never fails :P
Submission Category:
Interesting IoT
Yaml File
I have added 4 different YAML's to choose from:
Android Release
Rust Release across Linux, Windows and MacOS
Golang Release across Linux, Windows and MacOS
Publishing Hugo website on GitHub Pages
But it's not limited to these 4 workflows, you can essentially integrate this with anything that follows the following in any workflow file:
every step has an id
continue-on-error is set to true for every step
the Send Paniker step is inclusive of all step outcomes in the if condition
-name:Send Panikerif:steps.stepID.outcome != 'success'# Replace Step ID with your stepid run:curl http://YOUR_IP:3000/panik
A simple GitHub Action that physically puts your senses on alert when your build/release fails
GH Release Paniker
A simple GitHub Action that physically puts your senses on alert when your build/release fails
Usage
Requirements:
Raspberry Pi, LED, Buzzer, Internet connection, Router with port-forwarding capabilities and some patience :D
Step 1: Assembling the Circuit
Assemble the Circuit as given in the diagram
Step 2: Installing the FastAPI Server
Clone the repo using the comment git clone https://github.com/DarthBenro008/gh-release-paniker in your Raspberry Pi
Run the following commands:
cd server
pip install -r requirements.txt
unvicorn main:app --host=0.0.0.0 --port=3000
Step 3: Port forward and get the IP Address of your Raspberry Pi
Go to your Router settings and port forward the IP address of your Raspbery Pi on port 3000
Warning: Port forwarding exposes your raspberry pi to the internet, ensure you do not have any sensitive data or server running on it
Step 4: Pick a GitHub Action workflow from this repository