/pipe

minimal CI/CD workflow

Primary LanguageGo

pipe

a minimalist CI/CD workflow, it exposes a webhook that recieves a POST request on the /push endpoint then proceeds to run your shell script.

  • Download the pipe binary
curl -s "https://github.com/pariola/pipe/releases/download/v1/main" -L -o main
  • Make binary executable
chmod +x ./main
  • Create your entrypoint script push.sh
#!/bin/sh

# cleanup
echo "Cleaning up!"
rm -rf "$(pwd)/example"


git clone https://blessingpariola@bitbucket.org/blessingpariola/pipe-test.git "$(pwd)/example"
echo "Cloning complete"
  • Make script executable
chmod +x ./push.sh
  • Run
./main -script="./push.sh" -port=3000

NOTE

  • You can aswell add this line to the end of your crontab file in /etc/crontab so the command is automatically started on system reboot
@reboot root cd ~ && ./main -script="./push.sh" -port=3000