mirror of
https://code.thetadev.de/actions/kaniko.git
synced 2026-04-28 18:51:43 +00:00
prettier outputs
This commit is contained in:
10
README.md
10
README.md
@@ -1 +1,11 @@
|
|||||||
# Kaniko image builder
|
# 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.
|
||||||
|
|||||||
@@ -98,12 +98,16 @@ if [ -n "$INPUT_PLATFORMS" ]; then
|
|||||||
echo "Building for the following platforms: $platformArray"
|
echo "Building for the following platforms: $platformArray"
|
||||||
|
|
||||||
for platform in $platformArray; do
|
for platform in $platformArray; do
|
||||||
|
echo; echo "📦 Building image for $platform"
|
||||||
|
|
||||||
platformFn=$(echo "$platform" | sed 's#/#-#g')
|
platformFn=$(echo "$platform" | sed 's#/#-#g')
|
||||||
|
|
||||||
DESTINATION="--no-push --tarPath /build/${platformFn}.tar --destination $IMAGE"
|
DESTINATION="--no-push --tarPath /build/${platformFn}.tar --destination $IMAGE"
|
||||||
DIGEST="--image-name-tag-with-digest-file=/build/${platformFn}_image-tag-digest"
|
DIGEST="--image-name-tag-with-digest-file=/build/${platformFn}_image-tag-digest"
|
||||||
|
|
||||||
runKaniko "${ARGS} $DESTINATION $DIGEST"
|
runKaniko "${ARGS} $DESTINATION $DIGEST"
|
||||||
|
|
||||||
|
echo "✅ $platform image built: $(cat "/build/${platformFn}_image-tag-digest")"
|
||||||
done
|
done
|
||||||
|
|
||||||
crane auth login "$REGISTRY" -u "$USERNAME" -p "$PASSWORD"
|
crane auth login "$REGISTRY" -u "$USERNAME" -p "$PASSWORD"
|
||||||
@@ -124,6 +128,8 @@ if [ -n "$INPUT_PLATFORMS" ]; then
|
|||||||
IMAGE_TAG_DIGEST=$(eval "$manifest_cmd")
|
IMAGE_TAG_DIGEST=$(eval "$manifest_cmd")
|
||||||
else
|
else
|
||||||
# Build and push image for the default platform
|
# Build and push image for the default platform
|
||||||
|
echo; echo "📦 Building image"
|
||||||
|
|
||||||
DESTINATION="--destination $IMAGE"
|
DESTINATION="--destination $IMAGE"
|
||||||
if [ -n "$IMAGE_LATEST" ]; then
|
if [ -n "$IMAGE_LATEST" ]; then
|
||||||
DESTINATION="$DESTINATION --destination $IMAGE_LATEST"
|
DESTINATION="$DESTINATION --destination $IMAGE_LATEST"
|
||||||
|
|||||||
Reference in New Issue
Block a user