static ImmutableList<PushImageStep> makeListForManifestList(
      BuildContext buildContext,
      ProgressEventDispatcher.Factory progressEventDispatcherFactory,
      RegistryClient registryClient,
      ManifestTemplate manifestList,
      boolean manifestListAlreadyExists)
      throws IOException {
    Set<String> tags = buildContext.getAllTargetImageTags();

    EventHandlers eventHandlers = buildContext.getEventHandlers();
    try (TimerEventDispatcher ignored =
            new TimerEventDispatcher(eventHandlers, "Preparing manifest list pushers");
        ProgressEventDispatcher progressEventDispatcher =
            progressEventDispatcherFactory.create("launching manifest list pushers", tags.size())) {
      boolean singlePlatform = buildContext.getContainerConfiguration().getPlatforms().size() == 1;
      if (singlePlatform) {
        return ImmutableList.of(); // single image; no need to push a manifest list
      }

      if (JibSystemProperties.skipExistingImages() && manifestListAlreadyExists) {
        eventHandlers.dispatch(LogEvent.info("Skipping pushing manifest list; already exists."));
        return ImmutableList.of();
      }
      DescriptorDigest manifestListDigest = Digests.computeJsonDigest(manifestList);
      return tags.stream()
          .map(
              tag ->
                  new PushImageStep(
                      buildContext,
                      progressEventDispatcher.newChildProducer(),
                      registryClient,
                      manifestList,
                      tag,
                      manifestListDigest,
                      // TODO: a manifest list digest isn't an "image id". Figure out the right
                      // return value and type.
                      manifestListDigest))
          .collect(ImmutableList.toImmutableList());
    }
  }
Pushes a manifest or a manifest list for a tag. If not a manifest list, returns the manifest
digest ("image digest") and the container configuration digest ("image id") as {@link
BuildResult}. If a manifest list, returns the manifest list digest only.
jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/PushImageStep.java