How to copy image digest string from publish step to next steps

Here is a example of my config

steps:
  - name: publish
    image: plugins/docker
    settings:
      registry: my.registry.com
      username: username
      password: password
      repo: my.registry.com/app
      tags:
        - latest

  - name: deploy
    image: my-image/drone-deploy
    settings:
      namespace: dev
      repo: my.registry.com/app
      deployment: app
      container: app
      digest: $DIGEST_FROM_PUBLISH_STEP

How can I take image digest from publish step and use it in deploy step?

Here is a screenshot of publish step with image digets
image