redhat-actions / buildah-build

GitHub Action to use 'buildah' to build a container image.
https://github.com/marketplace/actions/buildah-build
MIT License
137 stars 35 forks source link

--layers option #42

Closed tetchel closed 3 years ago

tetchel commented 3 years ago

The --layers option is useful in buildah when given a persistent disk, but not useful in CI systems where the disk is discarded after each job

Since we've verified this option allows caching to work in the self-hosted buildah runner we should add an input for it

To keep with buildah behaviour, it should be false by default.

In addition, it may make sense to set export BUILDAH_LAYERS=true into the runner.

tetchel commented 3 years ago

I am adding BUILDAH_LAYERS=true to the buildah runner dockerfile, but if --layers=false is passed to this action then the env var will get overridden.

So if layers is not set, do not pass --layers at all, to leave it up to the environment.

divyansh42 commented 3 years ago

Okay :+1: