Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Executable
+31
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
# Manual push of stoat-role-bot image to your Gitea container registry.
|
||||
# Usage:
|
||||
# export GITEA_REGISTRY=mygitea.example.com
|
||||
# export GITEA_OWNER=myuser
|
||||
# ./push-to-gitea.sh
|
||||
# Or: ./push-to-gitea.sh mygitea.example.com myuser
|
||||
|
||||
set -e
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
GITEA_REGISTRY="${1:-$GITEA_REGISTRY}"
|
||||
GITEA_OWNER="${2:-$GITEA_OWNER}"
|
||||
IMAGE_NAME="stoat-role-bot"
|
||||
TAG="${3:-latest}"
|
||||
|
||||
if [ -z "$GITEA_REGISTRY" ] || [ -z "$GITEA_OWNER" ]; then
|
||||
echo "Usage: GITEA_REGISTRY=host GITEA_OWNER=username $0"
|
||||
echo " or: $0 <gitea-host> <owner-username> [tag]"
|
||||
echo "Example: $0 gitea.example.com john"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FULL_IMAGE="${GITEA_REGISTRY}/${GITEA_OWNER}/${IMAGE_NAME}:${TAG}"
|
||||
echo "Building and pushing to ${FULL_IMAGE} ..."
|
||||
|
||||
podman build -t "${FULL_IMAGE}" .
|
||||
podman push "${FULL_IMAGE}"
|
||||
|
||||
echo "Pushed. On your NAS run: docker pull ${FULL_IMAGE}"
|
||||
echo "Then create/update the container to use image: ${FULL_IMAGE}"
|
||||
Reference in New Issue
Block a user