Can a CircleCI workflow create a Docker image in a first step and then test that Docker image in a second step?

I’m new to CircleCI workflows and I would like to create a workflow with two steps.

  1. The first step (build job) will create and publish a Docker image
    with a certain tag. After successful termination of the first
    step it will trigger a second workflow step and handover the tag of
    the Docker image.
  2. The seconds step will then download the image by handed over by step 1 (e.g. using an ENV variable). Something like
version: 2
    jobs:
      build:
        docker:
          - image: docker.repo.ch/image:${TAG}

Is there some mechanism to hand over a value as a paramter from one build job to another one in within a CircleCI workflow?

Source: StackOverflow