-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmanifest.sh
executable file
·50 lines (42 loc) · 1.25 KB
/
manifest.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
50
#!/bin/bash
export DOCKER_CLI_EXPERIMENTAL=enabled
DATE=$(date '+%Y%m%d')
docker login >>/dev/null 2>&1
BASE_VERSIONS=($(find . -type d -regex '\.*/[0-9]+-base' | sort | sed 's/\.\///'))
for VERSION in "${BASE_VERSIONS[@]}"
do
TAG="sykescottages/php:$VERSION"
docker manifest rm $TAG
docker manifest create $TAG \
--amend "$TAG-amd64" \
--amend "$TAG-arm64"
docker manifest push $TAG
done
VERSIONS=($(find . -type d -regex '\.*/[0-9]+\.[0-9]+' | sort | sed 's/\.\///'))
for VERSION in "${VERSIONS[@]}"
do
TAG="sykescottages/php:${VERSION}-cli"
docker manifest rm $TAG
docker manifest create $TAG \
--amend "$TAG-amd64" \
--amend "$TAG-arm64"
docker manifest push $TAG
VERSION_TAG="${TAG}-${DATE}"
docker manifest rm $VERSION_TAG
docker manifest create $VERSION_TAG \
--amend "$TAG-amd64" \
--amend "$TAG-arm64"
docker manifest push $VERSION_TAG
TAG="sykescottages/php:${VERSION}-fpm"
docker manifest rm $TAG
docker manifest create $TAG \
--amend "$TAG-amd64" \
--amend "$TAG-arm64"
docker manifest push $TAG
VERSION_TAG="${TAG}-${DATE}"
docker manifest rm $VERSION_TAG
docker manifest create $VERSION_TAG \
--amend "$TAG-amd64" \
--amend "$TAG-arm64"
docker manifest push $VERSION_TAG
done