VERSION 0.8

# dummy target to warm up the cache
# but the test shouldn't use this since the pre-warming stage passes a --push
deps:
    FROM alpine:3.18

common-base:
    FROM alpine:3.18
    ARG --required REGISTRY
    ARG --required tag
    SAVE IMAGE --push $REGISTRY/myuser/myimg:$tag

use-common-base:
    FROM +common-base
    RUN echo "this won't trigger the SAVE IMAGE in common-base"

test:
    BUILD +use-common-base
    FROM alpine:3.18
    IF sleep 5
      BUILD +common-base
    END
