ci: 👷 add build all images script (#62)

* ci: 👷 add build all images script

* chore: 🔧 typo

Co-authored-by: apotdevin <apotdevincab@gmail.com>
This commit is contained in:
Anthony Potdevin 2020-06-06 13:57:24 +02:00 • committed by GitHub
parent 358dc3760a
commit 189495e002
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View file

@ -27,6 +27,7 @@
"build:32": "docker build --no-cache -f arm32v7.Dockerfile -t apotdevin/thunderhub:test-arm32v7 .", "build:32": "docker build --no-cache -f arm32v7.Dockerfile -t apotdevin/thunderhub:test-arm32v7 .",
"build:64": "docker build -f arm64v8.Dockerfile -t apotdevin/thunderhub:test-arm64v8 .", "build:64": "docker build -f arm64v8.Dockerfile -t apotdevin/thunderhub:test-arm64v8 .",
"build:manifest": "docker manifest create apotdevin/thunderhub:test apotdevin/thunderhub:test-amd64 apotdevin/thunderhub:test-arm32v7 apotdevin/thunderhub:test-arm64v8", "build:manifest": "docker manifest create apotdevin/thunderhub:test apotdevin/thunderhub:test-amd64 apotdevin/thunderhub:test-arm32v7 apotdevin/thunderhub:test-arm64v8",
"build:all": "sh ./scripts/buildAllImages.sh",
"upgrade-latest": "npx npm-check -u", "upgrade-latest": "npx npm-check -u",
"tsc": "tsc", "tsc": "tsc",
"update": "sh ./scripts/updateToLatest.sh" "update": "sh ./scripts/updateToLatest.sh"

19
scripts/buildAllImages.sh Normal file
View file

@ -0,0 +1,19 @@
#!/bin/sh
REPO=apotdevin/thunderhub
VERSION=0.7.1
docker build --pull -t $REPO:$VERSION-amd64 -f Dockerfile .
docker push $REPO:$VERSION-amd64
docker build --pull -t $REPO:$VERSION-arm32v7 -f arm32v7.Dockerfile .
docker push $REPO:$VERSION-arm32v7
docker build --pull -t $REPO:$VERSION-arm64v8 -f arm64v8.Dockerfile .
docker push $REPO:$VERSION-arm64v8
docker manifest create --amend $REPO:$VERSION $REPO:$VERSION-amd64 $REPO:$VERSION-arm32v7 $REPO:$VERSION-arm64v8
docker manifest annotate $REPO:$VERSION $REPO:$VERSION-amd64 --os linux --arch amd64
docker manifest annotate $REPO:$VERSION $REPO:$VERSION-arm32v7 --os linux --arch arm --variant v7
docker manifest annotate $REPO:$VERSION $REPO:$VERSION-arm64v8 --os linux --arch arm64 --variant v8
docker manifest push $REPO:$VERSION -p