Skip to content

build-docker-task hardcodes the image tag to SemVer2; wrapper repos need an external version #158

Closed

Description

@ptr727

Problem

build-docker-task.yml tags the image with :latest/:develop + the NBGV SemVer2:

tags: |
  docker.io/ptr727/projecttemplate:${{ inputs.branch == 'main' && 'latest' || 'develop' }}
  docker.io/ptr727/projecttemplate:${{ needs.get-version.outputs.SemVer2 }}

A repo that wraps an upstream release wants the immutable tag to be the upstream version, not the repo's own NBGV version. ptr727/ESPHome-NonRoot publishes :latest + :<esphome-version> (e.g. :2026.6.2), where the ESPHome version comes from a committed state file, and keeps SemVer2 only for the GitHub release tag + LABEL_VERSION. This required hand-editing the tag block and adding a "read the version" step to the leaf task.

It is reasonable that build-docker-task is part of the build layer a downstream owns, so this may be "working as intended." But since multiple Docker downstreams (ESPHome-NonRoot, and NxWitness with its per-image matrix) diverge here, a short note in AGENTS.md - "the image tag is build-layer-owned; drive it from whatever version source fits (SemVer2, an upstream pin, a matrix)" - would save the next wrapper repo from rediscovering it.


Surfaced while adopting the template in ptr727/ESPHome-NonRoot (see ptr727/ESPHome-NonRoot#61).

Activity

  1. added
    enhancement
    on Jun 20, 2026
  2. ptr727 commented on Jun 21, 2026

    @ptr727
    OwnerAuthor

    Documented in AGENTS.md Release Model that the Docker image tag is build-layer-owned and may be driven by any version source (SemVer2, an upstream pin, or a matrix).

    Addressed in #167 (merged to develop; not yet promoted to main, pending any further feedback as these changes are applied downstream).

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions