Skip to content

Commit fd67e7e

Browse files
possebonclaude
andcommitted
ci: add version number tag to Docker images
The latest and homolog workflows now tag images with the version from package.json in addition to their existing tags: - latest → latest + 2.3.8 - homolog → homolog + homolog-2.3.8 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ae23fd4 commit fd67e7e

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/publish_docker_image_homolog.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,18 @@ jobs:
2222
with:
2323
submodules: recursive
2424

25+
- name: Get version from package.json
26+
id: version
27+
run: echo "VERSION=$(node -p "require('./package.json').version")" >> "$GITHUB_OUTPUT"
28+
2529
- name: Docker meta
2630
id: meta
2731
uses: docker/metadata-action@v5
2832
with:
2933
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
30-
tags: homolog
34+
tags: |
35+
homolog
36+
homolog-${{ steps.version.outputs.VERSION }}
3137
3238
- name: Set up Docker Buildx
3339
uses: docker/setup-buildx-action@v3

.github/workflows/publish_docker_image_latest.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,18 @@ jobs:
2222
with:
2323
submodules: recursive
2424

25+
- name: Get version from package.json
26+
id: version
27+
run: echo "VERSION=$(node -p "require('./package.json').version")" >> "$GITHUB_OUTPUT"
28+
2529
- name: Docker meta
2630
id: meta
2731
uses: docker/metadata-action@v5
2832
with:
2933
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
30-
tags: latest
34+
tags: |
35+
latest
36+
${{ steps.version.outputs.VERSION }}
3137
3238
- name: Set up Docker Buildx
3339
uses: docker/setup-buildx-action@v3

0 commit comments

Comments
 (0)