Interview Prep/Docker/Build Performance & CI

What does `docker/metadata-action` do in GitHub Actions?

IntermediateProductionBuild Performance & CI
Answer

It generates tags and labels from the git context (branch, PR, semver tag, SHA) for docker/build-push-action.

- uses: docker/metadata-action@v5
  id: meta
  with:
    images: ghcr.io/org/app
    tags: |
      type=sha
      type=semver,pattern={{version}}
- uses: docker/build-push-action@v6
  with: { push: true, tags: "${{ steps.meta.outputs.tags }}", labels: "${{ steps.meta.outputs.labels }}" }
All Docker questions Roadmap: Docker & containers

More on Build Performance & CI