-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.sh
More file actions
22 lines (21 loc) · 965 Bytes
/
update.sh
File metadata and controls
22 lines (21 loc) · 965 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
ARCHS="linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6,linux/amd64,linux/386"
cd /home/sql/myimages
rm -rf /home/sql/myimages/webroot
echo "###CLONING###"
git clone https://github.com/sbrl/Pepperminty-Wiki.git webroot
cd /home/sql/myimages/webroot
LATEST="$(git describe --abbrev=0 --tags)"
echo "###CHECKING OUT $LATEST###"
git checkout $LATEST
cd /home/sql/myimages
echo "###BUILDING AND PUSHING $LATEST###"
docker buildx build --platform $ARCHS -t sqlatenwiki/peppermintywiki:latest -t sqlatenwiki/peppermintywiki:stable -t sqlatenwiki/peppermintywiki:$LATEST . --push
cd /home/sql/myimages
rm -rf /home/sql/myimages/webroot
echo "###CLONING###"
git clone https://github.com/sbrl/Pepperminty-Wiki.git webroot
cd /home/sql/myimages/webroot
chown www-data:www-data * -R
cd /home/sql/myimages
docker buildx build --platform $ARCHS -t sqlatenwiki/peppermintywiki:dev -t sqlatenwiki/peppermintywiki:master . --push