docker / docker/metadata-action

Add a `{{ main_version }}` expression

Open
#591 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/enhancement status/triage
Dominant language
TypeScript
Stars
1.1k
Forks
160
Avg merge
4d 17h
Merged PRs (30d)
12

Description

Description

Similar to the utility of a {{ license }} expression, this expression can have complexity to derive which would make it useful to offer.

See full details here: https://github.com/docker/metadata-action/pull/587#discussion_r2724659816

Alternatively {{ image_version }} might also be apt, depending on context (it's considered main in source code, but associated to the image.version output and default for image.version in OCI labels/annotations).

NOTE: This might be a bit tricky as a global expression given it must not be used for the first enabled (after priority sorting). I'm not sure how useful it'd be within the tags input anyhow 😅

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the full details in the linked pull request discussion, especially the points about main_version versus image_version and global-expression behavior. Define the intended semantics and naming before locating the expression implementation and its tests. Done means the chosen expression is supported without applying it to the first enabled item after priority sorting, with coverage for the relevant cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, github-actions, typescript
Domain
devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.