From 5ebcce6742c28b467102d0fb010b149cf2d5c90c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Tue, 21 Nov 2023 20:40:40 +0100 Subject: [PATCH] fix(cicd): inverted if statements --- .gitea/workflows/build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 27d1eb0..f1529cb 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -21,11 +21,11 @@ jobs: docker_tag=$(git describe --tags --abbrev=0 | cut -d 'v' -f2-) echo $docker_tag echo "docker_tag=${docker_tag}" >> GITHUB_OUTPUT - if curl --silent -f -lSL "https://hub.docker.com/v2/repositories/jiriks74/onlyoffice-documentserver/tags/${docker_tag}" > /dev/null; then exit 1; else exit 0; fi + if curl --silent -f -lSL "https://hub.docker.com/v2/repositories/jiriks74/onlyoffice-documentserver/tags/${docker_tag}" > /dev/null; then exit 0; fi shell: bash - name: Remove temporary files - if: steps.check-existing.conclusion == 'success' + if: steps.check-existing.conclusion == 'failure' id: remove-temp run: | echo ${{ steps.extract-version.outputs.docker_tag }} @@ -33,30 +33,30 @@ jobs: shell: bash - name: Install Docker - if: steps.check-existing.conclusion == 'success' + if: steps.check-existing.conclusion == 'failure' run: | apt-get update apt-get install docker.io -y - name: Login to DockerHub - if: steps.check-existing.conclusion == 'success' + if: steps.check-existing.conclusion == 'failure' uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Set up QEMU - if: steps.check-existing.conclusion == 'success' + if: steps.check-existing.conclusion == 'failure' uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - if: steps.check-existing.conclusion == 'success' + if: steps.check-existing.conclusion == 'failure' uses: docker/setup-buildx-action@v1 with: # driver-opts: network=host platforms: linux/amd64,linux/arm64 - name: Build and push image - if: steps.check-existing.conclusion == 'success' + if: steps.check-existing.conclusion == 'failure' uses: docker/build-push-action@v2 with: push: true @@ -67,7 +67,7 @@ jobs: - name: Image already built id: image-built - if: steps.check-existing.conclusion == 'failure' + if: steps.check-existing.conclusion == 'success' run: | echo "Image was already built and uploaded" exit 0