Sign inSign up

elct9620/image-validation-example

By elct9620

•Updated over 6 years ago

Image
0

273

elct9620/image-validation-example repository overview

⁠Image Validate Example

This is our discuss in 5xRuby⁠ internal channel for add image validation to our blog CI to prevent upload too large image.

⁠Usage

Build Docker Image

docker build -t image-validation .

Execute with specify location

docker run --rm -v /app/my-repo:/home/ruby image-validation

If success will return 0 as status code otherwise will return 1

This is design for GitLab CI

⁠Options

OptionNameDescription
-bbranchThe branch to compare
-ssizeThe max size allowed (kb)
-wwidthThe max width allowed (size)

Tag summary

Content type

Image

Digest

Size

33.9 MB

Last updated

over 6 years ago

docker pull elct9620/image-validation-example