Simple redeploy webhook pipeline

This commit is contained in:
akulij 2024-08-13 05:09:09 +03:00
commit 13640433f8
5 changed files with 20 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
webhook
**.tar.gz
webhook-*-*/

3
fetch.sh Executable file
View File

@ -0,0 +1,3 @@
wget https://github.com/adnanh/webhook/releases/download/2.8.1/webhook-linux-amd64.tar.gz
tar xvf webhook-linux-amd64.tar.gz
cp webhook-linux-amd64/webhook .

7
hooks.json Normal file
View File

@ -0,0 +1,7 @@
[
{
"id": "redeploy-webhook",
"execute-command": "./redeploy.sh",
"command-working-directory": "."
}
]

6
redeploy.sh Normal file
View File

@ -0,0 +1,6 @@
cd ~/gits
for d in */; do
cd "$d"
git pull
docker compose restart
done

1
run.sh Executable file
View File

@ -0,0 +1 @@
./webhook -hooks hooks.json -verbose