1
0
woodpecker-sonatype-nexus/.ci/envsh.registry
2024-05-28 14:46:02 +03:00

15 lines
384 B
Bash

#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# (c) 2024, Konstantin Demin
set -ef
## setup image registry authentication
export REGISTRY_AUTH_FILE="${PWD}/.ci/.auth.json"
if ! [ -s "${REGISTRY_AUTH_FILE}" ] ; then
if [ -z "${REGISTRY_AUTH}" ] ; then
echo 'REGISTRY_AUTH is missing'
exit 1
fi
printf '%s' "${REGISTRY_AUTH}" > "${REGISTRY_AUTH_FILE}"
fi