# docker/metadata-action

GitHub Action to extract metadata (tags, labels) from Git reference and GitHub events for Docker

Repository: https://github.com/docker/metadata-action
Canonical: https://ross.abutalabs.com/products/metadata-action
Homepage: https://github.com/marketplace/actions/docker-metadata-action
Language: TypeScript
License: Apache-2.0
License Family: permissive
Topics: docker, tags, labels, metadata, github-actions, github-actions-docker
Last push: 2026-08-05T16:18:44+00:00

## Health v2 (maintenance only)
Score: 91/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 96, release rhythm 79, longevity 100
- inputs: {"age_days": 2140, "days_push": 28, "days_rel": 62, "gap_med": 86.0, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1142, forks 161 (observed 2026-08-28T04:03:44.862096+00:00)

## What it is
A GitHub Action that extracts metadata such as tags and labels from Git references and GitHub events for Docker images. It is typically paired with docker/build-push-action to automatically generate image tags and OCI labels in CI workflows.

## Use cases
- generate docker image tags from git tags and branches in ci
- automatically label docker images with oci annotations
- tag docker images with semver from git tags
- add sha and edge tags to docker builds in github actions
- produce metadata for docker build push action
- sanitize image names and tags in ci pipelines

## When to choose
- you build and push Docker images from GitHub Actions and want automatic, consistent tagging
- you need OCI-compliant labels and annotations derived from Git and event context
- you want semver, sha, edge, or branch-based tag rules without writing shell scripts

## When to avoid
- your CI runs outside GitHub Actions
- you need fully custom tagging logic that the action's tag types and expressions cannot express
- you build images without a container registry or labeling workflow

## Facets
- artifact type: plugin
- maturity: active
- function: ci-cd, developer-tools, configuration-management
- domain: developer-tools
- platform: cloud, cli
- tags: github-actions, docker-images, image-tagging, oci-labels, semver, docker-build, devops, containers, automation, docker

## Member repositories
- docker/metadata-action (main) score 91

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:44.862096+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:35:04.994658+00:00, confidence not recorded.
  - readme: https://github.com/docker/metadata-action (fetched 2026-08-28T04:03:44.862096+00:00, sha 225fe1895350)
  - homepage: https://github.com/marketplace/actions/docker-metadata-action (fetched 2026-08-29T12:40:26.501651+00:00, sha c479c8fac4b4)
- Data as of 2026-08-30T08:39:29.467469+00:00.
