Skip to content

Push the docs image by full commit SHA too #36

Closed

Description

@wadewilliams

Context

The release workflow builds the docs image and tags it with the short commit SHA only (docker/metadata-action with type=sha,prefix=), then deploys by that tag.

A revert in #31 restores each service by the tag it was started from, when that tag is a git ref that still names the running image, which a short SHA does. Otherwise it falls back to the full SHA of the commit that was checked out before the deploy. The README tells downstream projects to push every image under its full commit SHA for exactly this reason.

The docs image isn't pushed under its full SHA. In the rare fallback case (the running container started from :latest, a moved tag, or a digest), the restore wouldn't find flow-deploy-docs:<full sha>. Because the docs service has build:, compose would then build the image from the restored checkout instead of pulling it. That works, but slowly, and it's not what the docs promise.

Proposal

Also push the image by its full SHA:

tags: |
  type=sha,prefix=
  type=sha,format=long,prefix=

Keep deploying by the short SHA, or switch the deploy to ${{ github.sha }} so the deployed tag and the fallback name are the same. Check what steps.meta.outputs.version resolves to with two type=sha entries before relying on it.

Size

Trivial: a couple of lines in .github/workflows/release.yml. Optional; this only matters in the fallback path.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions