From e4227bde0aabcd873d8849977da4186d4ccae8e1 Mon Sep 17 00:00:00 2001 From: "Fifo F." Date: Mon, 10 Jun 2024 18:56:53 +0000 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e49cb6f..7cda4b9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,14 +15,16 @@ build: services: - name: docker:24.0.5-dind script: - - docker pull sharelatex/sharelatex:latest - - docker run --name temp --entrypoint /bin/bash sharelatex/sharelatex:latest -c "tlmgr option repository $TEXLIVE_REPO && tlmgr update --self --all && tlmgr install scheme-full" - - docker commit temp $IMAGE_NAME - - docker save -o $ARCHIVED_IMAGE sharelatex:with-texlive-full - + - if [ ! -f $ARCHIVED_IMAGE ]; then + docker pull sharelatex/sharelatex:latest + docker run --name temp --entrypoint /bin/bash sharelatex/sharelatex:latest -c "tlmgr option repository $TEXLIVE_REPO && tlmgr update --self --all && tlmgr install scheme-full" + docker commit temp $IMAGE_NAME + docker save -o $ARCHIVED_IMAGE sharelatex:with-texlive-full + fi artifacts: paths: - $ARCHIVED_IMAGE + expire_in: 30 days push: stage: push @@ -39,4 +41,5 @@ push: - docker push $IMAGE_NAME artifacts: paths: - - $ARCHIVED_IMAGE \ No newline at end of file + - $ARCHIVED_IMAGE + expire_in: 30 days \ No newline at end of file