PUBLISH flag controls whether we push docker image to gcr or docker.io. We were testing existance of PUBLISH variable only, which looks like and issue as if we don't want to publish to docker.io we set PUBLISH=0. However, code check only if variable is set not its value. Therefore we promote it to docker.io even if our target was gcr.io. This pr fixes is by comparing PUBLISH value
Fixes promotion job logic.
PUBLISH flag controls whether we push docker image to gcr or docker.io. We were testing existance of PUBLISH variable only, which looks like and issue as if we don't want to publish to docker.io we set PUBLISH=0. However, code check only if variable is set not its value. Therefore we promote it to docker.io even if our target was gcr.io. This pr fixes is by comparing PUBLISH value