Debug pipeline

This commit is contained in:
2026-04-25 22:34:48 +02:00
parent c41145bae7
commit 4296a70d51

View File

@@ -65,7 +65,7 @@ jobs:
run: | run: |
apt-get update -qq && apt-get install -y -qq skopeo apt-get update -qq && apt-get install -y -qq skopeo
- name: Build and push image - name: Push with skopeo debug
env: env:
REG_USER: ${{ secrets.REGISTRY_USERNAME }} REG_USER: ${{ secrets.REGISTRY_USERNAME }}
REG_PASS: ${{ secrets.REGISTRY_PASSWORD }} REG_PASS: ${{ secrets.REGISTRY_PASSWORD }}
@@ -76,21 +76,14 @@ jobs:
docker build --pull -t "${REGISTRY}/${IMAGE}:${VERSION}" . docker build --pull -t "${REGISTRY}/${IMAGE}:${VERSION}" .
docker save "${REGISTRY}/${IMAGE}:${VERSION}" -o /tmp/image.tar docker save "${REGISTRY}/${IMAGE}:${VERSION}" -o /tmp/image.tar
# Write auth file using printf (no shell interpretation of password content)
AUTH=$(printf '%s:%s' "$REG_USER" "$REG_PASS" | base64 -w0) AUTH=$(printf '%s:%s' "$REG_USER" "$REG_PASS" | base64 -w0)
mkdir -p /tmp/auth mkdir -p /tmp/auth
printf '{"auths":{"%s":{"auth":"%s"}}}\n' "$REGISTRY" "$AUTH" > /tmp/auth/auth.json printf '{"auths":{"%s":{"auth":"%s"}}}\n' "$REGISTRY" "$AUTH" > /tmp/auth/auth.json
# Sanity check the file is readable and matches expected # --debug prints HTTP request/response details
cat /tmp/auth/auth.json skopeo --debug copy --authfile /tmp/auth/auth.json \
skopeo copy --authfile /tmp/auth/auth.json \
"docker-archive:/tmp/image.tar" \ "docker-archive:/tmp/image.tar" \
"docker://${REGISTRY}/${IMAGE}:${VERSION}" "docker://${REGISTRY}/${IMAGE}:${VERSION}" 2>&1 | tail -100
skopeo copy --authfile /tmp/auth/auth.json \
"docker://${REGISTRY}/${IMAGE}:${VERSION}" \
"docker://${REGISTRY}/${IMAGE}:latest"
- name: Tag git commit with version - name: Tag git commit with version
env: env: