anchor.diff:  { buildEnv
  +, checkedShellScript
   , curl
  +, docker
   , envsubst
   , ghr
  +, git
   , jq
   , postgrest
  -, docker
   , runCommand
  -, checkedShellScript
   }:
   let
     github =
  
positive.code:             not the same as DOCKER_REPO because we use the
              https://hub.docker.com/u/postgrestbot account for uploading to dockerhub.
            '';
        }
        ''
          docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
        '';
  
  
negative.code:       {
          name = "postgrest-release-dockerhub";
          docs = "Push a new release to Docker Hub";
          args = [
            "ARG_POSITIONAL_SINGLE([version], [git version tag to tag image with])"
            "ARG_USE_ENV([DOCKER_REPO], [], [DockerHub repository])"
          ];
        }
        ''
          # ARG_USE_ENV only adds defaults or docs for environment variables
          # We manually implement a required check here
          # See also: https://github.com/matejak/argbash/issues/80
          DOCKER_REPO="''${DOCKER_REPO:?DOCKER_REPO is required}"
  
          docker load -i ${docker.image}
  
          if test "$_arg_version" = "nightly"
          then
            suffix=$(${git}/bin/git show -s --format="%cd-%h" --date="format:%Y-%m-%d-%H-%M")
  
            docker tag postgrest:latest "$DOCKER_REPO/postgrest:nightly-$suffix"
            docker push "$DOCKER_REPO/postgrest:nightly-$suffix"
          else
            docker tag postgrest:latest "$DOCKER_REPO"/postgrest:latest
            docker tag postgrest:latest "$DOCKER_REPO/postgrest:$_arg_version"
  
            docker push "$DOCKER_REPO"/postgrest:latest
            docker push "$DOCKER_REPO/postgrest:$_arg_version"
          fi
        '';
  
  