komga/ci/publish-dockerhub.sh
Callum Loh 5e7194c166
ci: push container to GHCR & set source label on container (#956)
Update Github actions to push to GHCR and add labels to docker containers
so that renovate etc can find the source
2022-08-26 10:12:08 +08:00

33 lines
1 KiB
Bash
Executable file

#!/usr/bin/env bash
# Arguments:
# 1: next version
# 2: channel
source "$(dirname "$0")/docker-common.sh" $1 $2
# Push docker images (built previously)
cd komga
docker buildx build \
--platform $PLATFORMS \
--cache-from gotson/komga:$DOCKER_CHANNEL \
--tag gotson/komga:$DOCKER_CHANNEL \
--tag gotson/komga:$VERSION_MAJOR.x \
--tag gotson/komga:$1 \
--tag ghcr.io/gotson/komga:$DOCKER_CHANNEL \
--tag ghcr.io/gotson/komga:$VERSION_MAJOR.x \
--tag ghcr.io/gotson/komga:$1 \
--file ./Dockerfile . \
--push
# Temporary: build legacy adoptopenjdk image
docker buildx build \
--platform $PLATFORMS \
--cache-from gotson/komga:$DOCKER_CHANNEL-legacy \
--tag gotson/komga:$DOCKER_CHANNEL-legacy \
--tag gotson/komga:$VERSION_MAJOR.x-legacy \
--tag gotson/komga:$1-legacy \
--tag ghcr.io/gotson/komga:$DOCKER_CHANNEL-legacy \
--tag ghcr.io/gotson/komga:$VERSION_MAJOR.x-legacy \
--tag ghcr.io/gotson/komga:$1-legacy \
--file ./Dockerfile.legacy . \
--push