diff --git a/graph/decisions/docker-tags-composite-action-three-channel-branch-based-tag-f67518.md b/graph/decisions/docker-tags-composite-action-three-channel-branch-based-tag-f67518.md new file mode 100644 index 00000000000..068d43171cf --- /dev/null +++ b/graph/decisions/docker-tags-composite-action-three-channel-branch-based-tag-f67518.md @@ -0,0 +1,48 @@ +--- +id: f6751853-4ca9-4c82-a767-3348ad6275a7 +type: decision +title: "Docker Tags Composite Action: Three-Channel Branch-Based Tag Resolution" +tags: [gitea-actions, docker, ci-cd, composite-action, docker-tags, calver] +importance: 0.8 +confidence: 0.8 +created: "2026-03-05T03:31:12.382315+00:00" +updated: "2026-03-05T03:31:12.382315+00:00" +--- + +# Docker Tags Composite Action: Three-Channel Branch-Based Tag Resolution + +## Context + +Created `docker-tags/action.yml` in the `cal/gitea-actions` shared composite actions repository to standardize Docker image tagging across CI/CD pipelines. + +## Problem + +Consuming repos were duplicating conditional build logic to handle different Docker tags for different branches, leading to inconsistent tag schemes and maintenance overhead. + +## Decision + +Centralize Docker tag resolution into a reusable composite action with three defined channels: + +| Branch | Channel | Tags Generated | +|--------|---------|----------------| +| `main` | `stable` | `latest`, ``, `-` | +| `next-release` | `rc` | `next-release`, `-rc`, `-rc-` | +| anything else | `dev` | `dev`, `dev-` | + +## Action Interface + +**Inputs:** +- `image` — Docker image name (e.g. `manticorum67/paper-dynasty-discordapp`) +- `version` — CalVer string (from calver composite action) +- `sha_short` — Short git SHA + +**Outputs:** +- `tags` — comma-separated list of full image:tag strings +- `channel` — one of `stable`, `rc`, `dev` +- `primary_tag` — `latest`, `next-release`, or `dev` + +## Rationale + +- Single source of truth for tag conventions across all projects +- Consuming repos only need to pass image + version + sha +- Channel output enables downstream conditional logic (e.g., gate release creation on `channel == 'stable'`, skip Discord notify on `channel == 'dev'`)