DEV Community

Cover image for Action Paniker - Stimulate your senses physically when your build fails 🚨
Hemanth Krishna
Hemanth Krishna

Posted on

Action Paniker - Stimulate your senses physically when your build fails 🚨

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:

  1. GitHub action runs
  2. 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.
  3. 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

Circuit Diagram

  • 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

Paniker

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 Paniker
      if: steps.stepID.outcome != 'success' # Replace Step ID with your stepid 
      run: curl http://YOUR_IP:3000/panik 
Enter fullscreen mode Exit fullscreen mode

Source Code

GitHub logo DarthBenro008 / gh-release-paniker

A simple GitHub Action that physically puts your senses on alert when your build/release fails

banner

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

    circuit

  • 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
    Enter fullscreen mode Exit fullscreen mode
  • 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

    From the .github/workflows folder, you have…

Additional Resources / Info

Some of my personal open source projects that are using this workflow are:

Top comments (2)

Collapse
 
lirantal profile image
Liran Tal

Very cool!

Collapse
 
ful1e5 profile image
Kaiz Khatri

Noice 👍