Simple redeploy webhook pipeline
This commit is contained in:
commit
13640433f8
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
webhook
|
||||||
|
**.tar.gz
|
||||||
|
webhook-*-*/
|
||||||
3
fetch.sh
Executable file
3
fetch.sh
Executable 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
7
hooks.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": "redeploy-webhook",
|
||||||
|
"execute-command": "./redeploy.sh",
|
||||||
|
"command-working-directory": "."
|
||||||
|
}
|
||||||
|
]
|
||||||
6
redeploy.sh
Normal file
6
redeploy.sh
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
cd ~/gits
|
||||||
|
for d in */; do
|
||||||
|
cd "$d"
|
||||||
|
git pull
|
||||||
|
docker compose restart
|
||||||
|
done
|
||||||
Loading…
x
Reference in New Issue
Block a user