We dont need to cache builds

This commit is contained in:
Deon George 2023-02-05 12:51:38 +11:00
parent 3d92c10355
commit c315f208d4

View File

@ -15,14 +15,11 @@ docker:
- if [ -n "$GITHUB_TOKEN" ]; then cat $GITHUB_TOKEN |base64 -d > auth.json; fi
script:
- if [ ! -d docker ]; then mkdir docker; fi
- if [ -f init ]; then chmod 500 init; fi
- ([ -z "$REFRESH" -a -f docker/${CI_COMMIT_REF_SLUG} ]) && docker load < docker/${CI_COMMIT_REF_SLUG} || true
- echo -n ${CI_COMMIT_SHORT_SHA} > VERSION
- rm -rf vendor/ database/schema database/seeders database/factories/*
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${VERSION} .
- docker build -t ${CI_REGISTRY_IMAGE}:${VERSION} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
- docker save ${CI_REGISTRY_IMAGE}:${VERSION} > docker/${CI_COMMIT_REF_SLUG}
tags:
- docker
- x86_64