Debug pipeline
This commit is contained in:
@@ -76,21 +76,22 @@ 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
|
||||||
|
|
||||||
# Pre-authenticate via skopeo login so it caches the basic-auth header
|
# Write auth file using printf (no shell interpretation of password content)
|
||||||
# in /run/containers/0/auth.json. Then copy with no creds — uses cache.
|
AUTH=$(printf '%s:%s' "$REG_USER" "$REG_PASS" | base64 -w0)
|
||||||
mkdir -p /run/containers/0
|
mkdir -p /tmp/auth
|
||||||
skopeo login \
|
printf '{"auths":{"%s":{"auth":"%s"}}}\n' "$REGISTRY" "$AUTH" > /tmp/auth/auth.json
|
||||||
--username "$REG_USER" \
|
|
||||||
--password "$REG_PASS" \
|
|
||||||
"${REGISTRY}"
|
|
||||||
|
|
||||||
skopeo copy \
|
# Sanity check the file is readable and matches expected
|
||||||
|
cat /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}"
|
||||||
|
|
||||||
skopeo copy \
|
skopeo copy --authfile /tmp/auth/auth.json \
|
||||||
"docker://${REGISTRY}/${IMAGE}:${VERSION}" \
|
"docker://${REGISTRY}/${IMAGE}:${VERSION}" \
|
||||||
"docker://${REGISTRY}/${IMAGE}:latest"
|
"docker://${REGISTRY}/${IMAGE}:latest"
|
||||||
|
|
||||||
- name: Tag git commit with version
|
- name: Tag git commit with version
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ steps.version.outputs.version }}
|
VERSION: ${{ steps.version.outputs.version }}
|
||||||
|
|||||||
Reference in New Issue
Block a user