Debug pipeline

This commit is contained in:
2026-04-25 22:48:05 +02:00
parent 4296a70d51
commit 0bf4c6cf4c

View File

@@ -61,29 +61,22 @@ jobs:
fi
echo "version=${next}" >> "$GITHUB_OUTPUT"
- name: Install skopeo
run: |
apt-get update -qq && apt-get install -y -qq skopeo
- name: Push with skopeo debug
- name: Build and push image
env:
REG_USER: ${{ secrets.REGISTRY_USERNAME }}
REG_PASS: ${{ secrets.REGISTRY_PASSWORD }}
VERSION: ${{ steps.version.outputs.version }}
run: |
set -euo pipefail
docker build --pull -t "${REGISTRY}/${IMAGE}:${VERSION}" .
docker save "${REGISTRY}/${IMAGE}:${VERSION}" -o /tmp/image.tar
AUTH=$(printf '%s:%s' "$REG_USER" "$REG_PASS" | base64 -w0)
mkdir -p /tmp/auth
printf '{"auths":{"%s":{"auth":"%s"}}}\n' "$REGISTRY" "$AUTH" > /tmp/auth/auth.json
# --debug prints HTTP request/response details
skopeo --debug copy --authfile /tmp/auth/auth.json \
"docker-archive:/tmp/image.tar" \
"docker://${REGISTRY}/${IMAGE}:${VERSION}" 2>&1 | tail -100
printf '%s' "$REG_PASS" \
| docker login "${REGISTRY}" -u "$REG_USER" --password-stdin
docker build \
--pull \
-t "${REGISTRY}/${IMAGE}:${VERSION}" \
-t "${REGISTRY}/${IMAGE}:latest" \
.
docker push "${REGISTRY}/${IMAGE}:${VERSION}"
docker push "${REGISTRY}/${IMAGE}:latest"
- name: Tag git commit with version
env: