From b85e424dbe03c1176aa430ed9a90d86eb8f3da8b Mon Sep 17 00:00:00 2001 From: mdnapo Date: Sun, 13 Oct 2024 14:30:28 +0200 Subject: [PATCH] Removed test and commented build --- .gitea/workflows/build.yml | 32 ++++++++++++++++---------------- test.sh | 12 ------------ 2 files changed, 16 insertions(+), 28 deletions(-) delete mode 100755 test.sh diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index ab38144..e3511f8 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -16,21 +16,21 @@ jobs: IMAGE_VERSION="$(cat version.txt)" VERSIONED_IMAGE_TAG="$IMAGE_NAME:$IMAGE_VERSION" LATEST_IMAGE_TAG="$IMAGE_NAME:latest" - - # Login to the registry - docker login git.devdisciples.com --username ${{ DOCKER_USER }} --password-stdin ${{ DOCKER_PASS }} + echo "Hello?" + # # Login to the registry + # docker login git.devdisciples.com --username ${{ DOCKER_USER }} --password-stdin ${{ DOCKER_PASS }} - # Check if the image exists. - # EXISTS = 0 if the image was found else 1. - EXISTS=$(docker manifest inspect $VERSIONED_TAG > /dev/null 2>&1; echo $?) + # # Check if the image exists. + # # EXISTS = 0 if the image was found else 1. + # EXISTS=$(docker manifest inspect $VERSIONED_TAG > /dev/null 2>&1; echo $?) - # Build a new image and push it if the versioned tag was not found. - if [[ $EXISTS -eq 1 ]]; then - docker build -t $VERSIONED_IMAGE_TAG -t $LATEST_IMAGE_TAG . - docker push $VERSIONED_IMAGE_TAG - docker push $LATEST_IMAGE_TAG - # Else notify the user that the image tag already exists and exit with status code 1. - else - echo "Image $VERSIONED_TAG already exists, you should probably increment the version." - exit 1 - fi + # # Build a new image and push it if the versioned tag was not found. + # if [[ $EXISTS -eq 1 ]]; then + # docker build -t $VERSIONED_IMAGE_TAG -t $LATEST_IMAGE_TAG . + # docker push $VERSIONED_IMAGE_TAG + # docker push $LATEST_IMAGE_TAG + # # Else notify the user that the image tag already exists and exit with status code 1. + # else + # echo "Image $VERSIONED_TAG already exists, you should probably increment the version." + # exit 1 + # fi diff --git a/test.sh b/test.sh deleted file mode 100755 index 9e6abad..0000000 --- a/test.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - - -EXISTS=$(docker manifest inspect git.devdisciples.com/devdisciples/m4gdocs:latests > /dev/null 2>&1; echo $?) - -echo $EXISTS - -if [[ $EXISTS -eq 1 ]]; then - echo "Image does not exist." -else - echo "Image exists." -fi \ No newline at end of file