From a28f0c46c57108fd5f4ce267e975211fab628139 Mon Sep 17 00:00:00 2001 From: carbotaniuman Date: Thu, 30 Sep 2021 23:58:53 -0500 Subject: [PATCH] Update CI a bit --- .gitlab-ci.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e1ee9bc..1a429dc 100755 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,6 @@ build: script: - export VERSION="$CI_COMMIT_REF_NAME" - ./gradlew build - - "ls -lah build/libs" cache: key: "mangadex_at_home-build" paths: @@ -21,12 +20,11 @@ build: - "build/libs/mangadex_at_home-*-all.jar" publish: - image: alpine + image: alpine/git stage: publish - before_script: - - apk update && apk add git zip - - export VERSION="$CI_COMMIT_REF_NAME" + script: + - export VERSION="$CI_COMMIT_REF_NAME" - cp build/libs/mangadex_at_home-${VERSION}-all.jar ./ - zip -r9 mangadex_at_home-${VERSION}.zip mangadex_at_home-${VERSION}-all.jar settings.sample.yaml dependencies: @@ -39,18 +37,19 @@ publish: - "settings.sample.yaml" publish_docker: - image: docker:git + image: docker:20.10.8-git + services: + - docker:20.10.8-dind stage: publish only: - tags - services: - - docker:dind + before_script: - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin ${CI_REGISTRY} - - export VERSION="$CI_COMMIT_REF_NAME" dependencies: - build script: + - export VERSION="$CI_COMMIT_REF_NAME" - mv build/libs/mangadex_at_home-${VERSION}-all.jar build/libs/mangadex_at_home.jar - docker build . -t ${CI_REGISTRY_IMAGE}:${VERSION} - docker push ${CI_REGISTRY_IMAGE}:${VERSION}