diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10b6d4325..a63b04ee0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -240,7 +240,7 @@ jobs: add_git_labels: true build_args: SUBNET_NODE_VERSION=${{ github.event.inputs.tag || env.GITHUB_SHA_SHORT }},GIT_BRANCH=${{ env.GITHUB_REF_SHORT }},GIT_COMMIT=${{ env.GITHUB_SHA_SHORT }} # Only push if ( we have DockerHub credentials and ((a tag was passed in) or (we're building a non-master branch)) - push: ${{ secrets.DOCKERHUB_USERNAME && secrets.DOCKERHUB_PASSWORD && (github.event.inputs.tag || (github.ref != 'refs/heads/master')) }} + push: ${{ (secrets.DOCKERHUB_USERNAME != '') && (secrets.DOCKERHUB_PASSWORD != '') && ((github.event.inputs.tag != '') || (github.ref != 'refs/heads/master')) }} # Build docker image, tag it with the git tag and `latest` if running on master branch, and publish under the following conditions # Will publish if: @@ -284,4 +284,4 @@ jobs: add_git_labels: true build_args: SUBNET_NODE_VERSION=${{ github.event.inputs.tag || env.GITHUB_SHA_SHORT }},GIT_BRANCH=${{ env.GITHUB_REF_SHORT }},GIT_COMMIT=${{ env.GITHUB_SHA_SHORT }} # Only push if ( we have DockerHub credentials and ((a tag was passed in) or (we're building a non-master branch)) - push: ${{ secrets.DOCKERHUB_USERNAME && secrets.DOCKERHUB_PASSWORD && (github.event.inputs.tag || (github.ref != 'refs/heads/master')) }} + push: ${{ (secrets.DOCKERHUB_USERNAME != '') && (secrets.DOCKERHUB_PASSWORD != '') && ((github.event.inputs.tag != '') || (github.ref != 'refs/heads/master')) }}