Initial commit

This commit is contained in:
DavidOnTop 2024-08-12 16:26:09 +02:00
commit 8763b7faf2
No known key found for this signature in database
GPG key ID: 5D05538A45D5149F
9 changed files with 86 additions and 0 deletions

13
.git_hooks/post-update Executable file
View file

@ -0,0 +1,13 @@
#!/bin/bash
BRANCH=$(git rev-parse --symbolic --abbrev-ref $1)
RP="${PWD#/srv/git/}"
echo "Creating minio backup."
git bundle create repo.bundle --all
mcli mv "$PWD/repo.bundle" "hs/git/$PWD/repo.bundle"
echo "Repository $RP backed up to minio."
echo "Sending cicd push webhook"
curl -s -o /dev/null -w "" https://n8n.davidon.top/webhook/git/push/$RP/$BRANCH
echo "Sent cicd push webhook"