#!/bin/bash RP="${PWD#/srv/git/}" while read oldrev newrev ref do # Check if the ref is a tag and if it's a new tag if [[ $ref == refs/tags/* ]] then echo "New tag detected: $ref" echo "Sending cicd tag webhook" curl -s -o /dev/null -w "" https://n8n.davidon.top/webhook/git/tag/$RP/$BRANCH echo "Sent cicd tag webhook" fi done