forked from itchy/Dialyse-Webseite
merge upstream
Build and Push Container Image / Build & Push to Gitea Package Registry (push) Successful in 2m9s
Build and Push Container Image / Build & Push to Gitea Package Registry (push) Successful in 2m9s
This commit is contained in:
commit
0141fa752a
1 file changed
+6
-3
@@ -69,8 +69,8 @@ jobs:
|
||||
docker push "${FULL_IMAGE}:${SHORT_SHA}"
|
||||
docker push "${FULL_IMAGE}:latest"
|
||||
else
|
||||
echo "Docker daemon rejected login (likely plain HTTP registry ${SERVER_URL} not in host insecure-registries)."
|
||||
echo "Using skopeo to push image directly from Docker daemon with TLS verification disabled..."
|
||||
echo "Docker daemon rejected login (plain HTTP registry ${SERVER_URL} not in host insecure-registries)."
|
||||
echo "Exporting built image with Docker CLI and pushing via skopeo..."
|
||||
if ! command -v skopeo >/dev/null 2>&1; then
|
||||
apt-get update && apt-get install -y skopeo
|
||||
fi
|
||||
@@ -78,12 +78,15 @@ jobs:
|
||||
if [ "${IS_HTTP}" = "true" ]; then
|
||||
TLS_FLAG="--dest-tls-verify=false"
|
||||
fi
|
||||
docker save "${FULL_IMAGE}:${SHORT_SHA}" -o /tmp/image.tar
|
||||
for TAG in "${SAFE_REF}" "${SHORT_SHA}" "latest"; do
|
||||
echo "Pushing ${FULL_IMAGE}:${TAG}..."
|
||||
skopeo copy ${TLS_FLAG} \
|
||||
--dest-creds "${REGISTRY_USER}:${REGISTRY_TOKEN}" \
|
||||
"docker-daemon:${FULL_IMAGE}:${TAG}" \
|
||||
"docker-archive:/tmp/image.tar" \
|
||||
"docker://${FULL_IMAGE}:${TAG}"
|
||||
done
|
||||
rm -f /tmp/image.tar
|
||||
fi
|
||||
else
|
||||
echo "Docker socket (/var/run/docker.sock) is not mounted in this runner container."
|
||||
|
||||
Reference in new issue
Block a user