From e75fb1789905325792bc6957072b4995d05000ab Mon Sep 17 00:00:00 2001 From: strawberry Date: Mon, 1 Apr 2024 22:29:40 -0400 Subject: [PATCH] ci: dont run docker stuff if not a PR *and* both env variables are not empty Signed-off-by: strawberry --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af6e5323..f5f3f582 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -184,7 +184,7 @@ jobs: env: DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} DOCKER_USERNAME: ${{ vars.DOCKER_USERNAME }} - if: ${{ (github.event_name != 'pull_request') || ((env.DOCKER_USERNAME != '') && (env.DOCKERHUB_TOKEN != '')) }} + if: ${{ (github.event_name != 'pull_request') && (env.DOCKER_USERNAME != '') && (env.DOCKERHUB_TOKEN != '') }} uses: docker/login-action@v3 with: # username is not really a secret @@ -209,7 +209,7 @@ jobs: IMAGE_NAME: docker.io/${{ github.repository }} IMAGE_SUFFIX_AMD64: amd64 IMAGE_SUFFIX_ARM64V8: arm64v8 - if: ${{ (github.event_name != 'pull_request') || ((env.DOCKER_USERNAME != '') && (env.DOCKERHUB_TOKEN != '')) }} + if: ${{ (github.event_name != 'pull_request') && (env.DOCKER_USERNAME != '') && (env.DOCKERHUB_TOKEN != '') }} run: | docker load -i oci-image-amd64.tar.gz IMAGE_ID_AMD64=$(docker images -q conduit:main)