diff --git a/README.md b/README.md index fb9346c..0a26645 100644 --- a/README.md +++ b/README.md @@ -1 +1,11 @@ # Kaniko image builder + +Gitea/Github action for building docker images using Kaniko. Kaniko is an image builder +that runs the build steps on the host system without a container runtime Therefore it +runs without issues in an unprivileged container. + +The action script supports building containers for multiple architectures. This requires +the installation of `qemu-user-static` on the runner machine. + +This project is based on [action-kaniko](https://github.com/aevea/action-kaniko) by Alex +Viscreanu. diff --git a/entrypoint.sh b/entrypoint.sh index 5f53c1e..0377195 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -98,12 +98,16 @@ if [ -n "$INPUT_PLATFORMS" ]; then echo "Building for the following platforms: $platformArray" for platform in $platformArray; do + echo; echo "📦 Building image for $platform" + platformFn=$(echo "$platform" | sed 's#/#-#g') DESTINATION="--no-push --tarPath /build/${platformFn}.tar --destination $IMAGE" DIGEST="--image-name-tag-with-digest-file=/build/${platformFn}_image-tag-digest" runKaniko "${ARGS} $DESTINATION $DIGEST" + + echo "✅ $platform image built: $(cat "/build/${platformFn}_image-tag-digest")" done crane auth login "$REGISTRY" -u "$USERNAME" -p "$PASSWORD" @@ -124,6 +128,8 @@ if [ -n "$INPUT_PLATFORMS" ]; then IMAGE_TAG_DIGEST=$(eval "$manifest_cmd") else # Build and push image for the default platform + echo; echo "📦 Building image" + DESTINATION="--destination $IMAGE" if [ -n "$IMAGE_LATEST" ]; then DESTINATION="$DESTINATION --destination $IMAGE_LATEST"