forked from itchy/Dialyse-Webseite
fix build
This commit is contained in:
1 parent
ab589c23fd
commit
2ba30e2d46
1 file changed
+6
-4
@@ -10,7 +10,6 @@ on:
|
|||||||
- 'v*'
|
- 'v*'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
name: Build & Push to Gitea Package Registry
|
name: Build & Push to Gitea Package Registry
|
||||||
@@ -70,8 +69,8 @@ jobs:
|
|||||||
docker push "${FULL_IMAGE}:${SHORT_SHA}"
|
docker push "${FULL_IMAGE}:${SHORT_SHA}"
|
||||||
docker push "${FULL_IMAGE}:latest"
|
docker push "${FULL_IMAGE}:latest"
|
||||||
else
|
else
|
||||||
echo "Docker daemon rejected login (likely plain HTTP registry ${SERVER_URL} not in host insecure-registries)."
|
echo "Docker daemon rejected login (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 "Exporting built image with Docker CLI and pushing via skopeo..."
|
||||||
if ! command -v skopeo >/dev/null 2>&1; then
|
if ! command -v skopeo >/dev/null 2>&1; then
|
||||||
apt-get update && apt-get install -y skopeo
|
apt-get update && apt-get install -y skopeo
|
||||||
fi
|
fi
|
||||||
@@ -79,12 +78,15 @@ jobs:
|
|||||||
if [ "${IS_HTTP}" = "true" ]; then
|
if [ "${IS_HTTP}" = "true" ]; then
|
||||||
TLS_FLAG="--dest-tls-verify=false"
|
TLS_FLAG="--dest-tls-verify=false"
|
||||||
fi
|
fi
|
||||||
|
docker save "${FULL_IMAGE}:${SHORT_SHA}" -o /tmp/image.tar
|
||||||
for TAG in "${SAFE_REF}" "${SHORT_SHA}" "latest"; do
|
for TAG in "${SAFE_REF}" "${SHORT_SHA}" "latest"; do
|
||||||
|
echo "Pushing ${FULL_IMAGE}:${TAG}..."
|
||||||
skopeo copy ${TLS_FLAG} \
|
skopeo copy ${TLS_FLAG} \
|
||||||
--dest-creds "${REGISTRY_USER}:${REGISTRY_TOKEN}" \
|
--dest-creds "${REGISTRY_USER}:${REGISTRY_TOKEN}" \
|
||||||
"docker-daemon:${FULL_IMAGE}:${TAG}" \
|
"docker-archive:/tmp/image.tar" \
|
||||||
"docker://${FULL_IMAGE}:${TAG}"
|
"docker://${FULL_IMAGE}:${TAG}"
|
||||||
done
|
done
|
||||||
|
rm -f /tmp/image.tar
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Docker socket (/var/run/docker.sock) is not mounted in this runner container."
|
echo "Docker socket (/var/run/docker.sock) is not mounted in this runner container."
|
||||||
|
|||||||
Reference in new issue
Block a user