Skip to content

Set image digest in output #286

Description

I need to have pushed image digest so it can be signed with cosign.
Example action step:

      - name: Sign the published Docker image
        if: ${{ github.event_name != 'pull_request' }}
        env:
          TAGS: ${{ steps.meta.outputs.tags }}
          DIGEST: ${{ steps.build-and-push.outputs.digest }}
        # This step uses the identity token to provision an ephemeral certificate
        # against the sigstore community Fulcio instance.
        run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}

Activity

  1. chrmarti commented on Apr 2, 2024

    @chrmarti
    Collaborator

    I don't see a way of getting this from docker buildx build, so the action or the CLI would have to extract the digest.

    I suggest you do this in your build script by adding a unique tag with the imageTag input (which accepts a comma separated list in case you already use it) of the devcontainer action and using that tag to look up the digest from docker inspect.

  2. Clockwork-Muse commented on Sep 8, 2026

    @Clockwork-Muse

    Christof Marti (@chrmarti) - Metadata output information can now be output into a metadata file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions