16 lines
358 B
Bash
Executable file
16 lines
358 B
Bash
Executable file
#!/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
|
|
|