-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_images.sh
25 lines (18 loc) · 1.19 KB
/
build_images.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
#!/bin/bash
# Set environment variables for security
export GHCR_USERNAME=
export GHCR_PASSWORD=
# Set version variable
export VERSION=
podman login --username $GHCR_USERNAME --password $GHCR_PASSWORD ghcr.io
# You need to be logged in to ghcr.io
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
podman build --ignorefile ./.containerignore -t ghcr.io/felixmoelders/ankaios-dashboard:${VERSION}-amd64 --platform linux/amd64 -f ./Dockerfile ${SCRIPT_DIR}/../../
podman build --ignorefile ./.containerignore -t ghcr.io/felixmoelders/ankaios-dashboard:${VERSION}-arm64 --platform linux/arm64 -f ./Dockerfile ${SCRIPT_DIR}/../../
podman push ghcr.io/felixmoelders/ankaios-dashboard:${VERSION}-amd64
podman push ghcr.io/felixmoelders/ankaios-dashboard:${VERSION}-arm64
podman manifest create ankaios-dashboard
podman manifest add ankaios-dashboard ghcr.io/felixmoelders/ankaios-dashboard:${VERSION}-amd64
podman manifest add ankaios-dashboard ghcr.io/felixmoelders/ankaios-dashboard:${VERSION}-arm64
podman manifest push --all ankaios-dashboard ghcr.io/felixmoelders/ankaios-dashboard:${VERSION}
podman manifest push --all ankaios-dashboard ghcr.io/felixmoelders/ankaios-dashboard:latest