You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/workflows/semver-container.md
+17-2Lines changed: 17 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,12 @@
2
2
3
3
Reusable workflow that:
4
4
5
-
- tags an existing container image with semver tags (`x.y.z`, `x`, `x.y`) based on a provided release tag
5
+
- tags an existing container image with semver tags (`x.y.z`, `x`, `x.y`) based on a provided release tag, and optionally `latest`
6
6
- verifies that a corresponding container image (tagged with the commit SHA) already exists
7
7
8
8
Use this when you already have an "edge" or commit-SHA container image (for example from the `publish-container` workflow) and you want to promote it to a semver release.
9
9
10
-
> **Note:** The `x` and `x.y` floating tags are only applied for stable releases. Pre-release versions (e.g. `1.0.0-beta.1`) receive only the full version tag.
10
+
> **Note:** The `x`, `x.y`, and `latest` floating tags are only applied for stable releases. Pre-release versions (e.g. `1.0.0-beta.1`) receive only the full version tag.
11
11
12
12
## Inputs
13
13
@@ -16,6 +16,7 @@ Use this when you already have an "edge" or commit-SHA container image (for exam
16
16
|`image-name`| Yes | — | Image name, e.g. `my-app` or `services/api`. |
17
17
|`registry`| No |`'ghcr.io'`| Registry host. |
18
18
|`tag`| Yes | — | The release tag to derive semver from (e.g. `1.2.3` or `v1.2.3`). Typically passed from the `release-tag` output of the `semantic-release` workflow. |
19
+
|`tag-latest`| No |`false`| Also push a `latest` tag. Only applied to stable releases, not pre-releases. |
19
20
20
21
## Secrets
21
22
@@ -45,3 +46,17 @@ This will:
45
46
46
47
- check that an image `ghcr.io/<owner>/my-service:<sha>` exists
47
48
- push additional tags like `1.2.3`, `1`, and `1.2` to that image (or just `1.2.3` for pre-releases)
49
+
50
+
To also push a `latest` tag on stable releases, set `tag-latest: true`:
0 commit comments