dropshell-build/publish.sh
j842 95772be1a5
Some checks failed
dropshell-build / build (push) Failing after 6m18s
fix gitea?
2025-06-10 14:21:39 +12:00

37 lines
892 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
die() {
echo "Fatal error:"
echo "$1"
exit 1
}
# check the variables are present
[[ -n $SOS_WRITE_TOKEN ]] || die "SOS_WRITE_TOKEN not specified"
[[ -n $DOCKER_PUSH_TOKEN ]] || die "DOCKER_PUSH_TOKEN not specified"
# Publish gitea.jde.nz/public/dropshell-build-base:latest
docker login -u "anything" -p "${DOCKER_PUSH_TOKEN}" gitea.jde.nz
docker push "gitea.jde.nz/public/dropshell-build-base:latest"
#SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
# # download the sos binary
# SOS="${SCRIPT_DIR}/temp/sos"
# mkdir -p "${SCRIPT_DIR}/temp"
# trap 'rm -rf "${SCRIPT_DIR}/temp"' EXIT
# curl -L -o "${SOS}" https://getbin.xyz/sos
# chmod +x "${SOS}"
# # upload the dropshell-build script
# "${SOS}" upload "getbin.xyz" "${SCRIPT_DIR}/Dockerfile.dropshell-build" "Dockerfile.dropshell-build:latest"
echo "Done"