-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpush-image.sh
More file actions
30 lines (24 loc) · 794 Bytes
/
push-image.sh
File metadata and controls
30 lines (24 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
PROJECT_NAME="dynamic-upstream"
REPO_NAME="soulteary/prebuilt-nginx-modules"
RELEASE_DIR="./docker";
for subVer in $RELEASE_DIR/*; do
set -a
. "$subVer/.env"
set +a
REPO_TAG="ngx-$NGINX_VERSION-$PROJECT_NAME-$MODULE_VERSION";
if [ -f "$subVer/Dockerfile.alpine" ]; then
BUILD_NAME="$REPO_NAME:$REPO_TAG-alpine"
if [[ "$(docker images -q $BUILD_NAME 2> /dev/null)" != "" ]]; then
echo "Push: $BUILD_NAME";
docker push $BUILD_NAME;
fi
fi
if [ -f "$subVer/Dockerfile.debian" ]; then
BUILD_NAME="$REPO_NAME:$REPO_TAG"
if [[ "$(docker images -q $BUILD_NAME 2> /dev/null)" != "" ]]; then
echo "Push: $BUILD_NAME";
docker push $BUILD_NAME;
fi
fi
done