forked from lucaslorentz/caddy-docker-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpush-images-linux.sh
executable file
·49 lines (40 loc) · 2.67 KB
/
push-images-linux.sh
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
set -e
docker login -u lucaslorentz -p "$DOCKER_PASSWORD"
docker push lucaslorentz/caddy-docker-proxy:ci
docker push lucaslorentz/caddy-docker-proxy:ci-alpine
docker push lucaslorentz/caddy-docker-proxy:ci-arm32v6
docker push lucaslorentz/caddy-docker-proxy:ci-alpine-arm32v6
if [[ "${RELEASE_VERSION}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-.*)?$ ]]; then
echo "Releasing version ${RELEASE_VERSION}..."
PATCH_VERSION=$(echo $RELEASE_VERSION | cut -c2-)
MINOR_VERSION=$(echo $PATCH_VERSION | cut -d. -f-2)
# scratch
docker tag lucaslorentz/caddy-docker-proxy:ci lucaslorentz/caddy-docker-proxy:latest
docker tag lucaslorentz/caddy-docker-proxy:ci lucaslorentz/caddy-docker-proxy:${PATCH_VERSION}
docker tag lucaslorentz/caddy-docker-proxy:ci lucaslorentz/caddy-docker-proxy:${MINOR_VERSION}
docker push lucaslorentz/caddy-docker-proxy:latest
docker push lucaslorentz/caddy-docker-proxy:${PATCH_VERSION}
docker push lucaslorentz/caddy-docker-proxy:${MINOR_VERSION}
# alpine
docker tag lucaslorentz/caddy-docker-proxy:ci-alpine lucaslorentz/caddy-docker-proxy:alpine
docker tag lucaslorentz/caddy-docker-proxy:ci-alpine lucaslorentz/caddy-docker-proxy:${PATCH_VERSION}-alpine
docker tag lucaslorentz/caddy-docker-proxy:ci-alpine lucaslorentz/caddy-docker-proxy:${MINOR_VERSION}-alpine
docker push lucaslorentz/caddy-docker-proxy:alpine
docker push lucaslorentz/caddy-docker-proxy:${PATCH_VERSION}-alpine
docker push lucaslorentz/caddy-docker-proxy:${MINOR_VERSION}-alpine
# scratch arm32v6
docker tag lucaslorentz/caddy-docker-proxy:ci-arm32v6 lucaslorentz/caddy-docker-proxy:latest-arm32v6
docker tag lucaslorentz/caddy-docker-proxy:ci-arm32v6 lucaslorentz/caddy-docker-proxy:${PATCH_VERSION}-arm32v6
docker tag lucaslorentz/caddy-docker-proxy:ci-arm32v6 lucaslorentz/caddy-docker-proxy:${MINOR_VERSION}-arm32v6
docker push lucaslorentz/caddy-docker-proxy:latest-arm32v6
docker push lucaslorentz/caddy-docker-proxy:${PATCH_VERSION}-arm32v6
docker push lucaslorentz/caddy-docker-proxy:${MINOR_VERSION}-arm32v6
# alpine arm32v6
docker tag lucaslorentz/caddy-docker-proxy:ci-alpine-arm32v6 lucaslorentz/caddy-docker-proxy:alpine-arm32v6
docker tag lucaslorentz/caddy-docker-proxy:ci-alpine-arm32v6 lucaslorentz/caddy-docker-proxy:${PATCH_VERSION}-alpine-arm32v6
docker tag lucaslorentz/caddy-docker-proxy:ci-alpine-arm32v6 lucaslorentz/caddy-docker-proxy:${MINOR_VERSION}-alpine-arm32v6
docker push lucaslorentz/caddy-docker-proxy:alpine-arm32v6
docker push lucaslorentz/caddy-docker-proxy:${PATCH_VERSION}-alpine-arm32v6
docker push lucaslorentz/caddy-docker-proxy:${MINOR_VERSION}-alpine-arm32v6
fi