Skip to content

Commit 3e779a9

Browse files
committed
fix(ci): publish exact version tag only, remove minor and latest aliases
Signed-off-by: lelia <lelia@socket.dev>
1 parent 324398c commit 3e779a9

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/_docker-pipeline.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,14 @@ jobs:
9393
images: |
9494
ghcr.io/socketdev/${{ inputs.name }}
9595
${{ secrets.DOCKERHUB_USERNAME }}/${{ inputs.name }}
96+
# Disable the automatic :latest tag — metadata-action adds it by default
97+
# for semver tag pushes. Mutable tags are inappropriate for a security tool.
98+
flavor: |
99+
latest=false
96100
tags: |
97-
# Tag push (v2.0.0) → immutable Docker tags 2.0.0 and 2.0 only.
98-
# :latest and floating major tags (v2) are intentionally omitted —
99-
# this is a security tool and mutable tags set the wrong example.
100-
# Users should pin to a specific version or digest; Dependabot manages upgrades.
101+
# Tag push (v2.0.0) → exact immutable version tag only.
102+
# Minor (2.0) and latest tags are intentionally omitted.
101103
type=semver,pattern={{version}}
102-
type=semver,pattern={{major}}.{{minor}}
103104
# workflow_dispatch re-publish → use the version input directly
104105
type=raw,value=${{ inputs.version }},enable=${{ !inputs.tag_push }}
105106
labels: |

.github/workflows/publish-docker.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ jobs:
106106
gh release create "${{ github.ref_name }}" \
107107
--title "${{ github.ref_name }}" \
108108
--generate-notes \
109-
--verify-tag
109+
--verify-tag \
110+
|| echo "Release already exists (re-run scenario) — skipping creation"
110111
env:
111112
GH_TOKEN: ${{ steps.bot.outputs.token }}
112113

0 commit comments

Comments
 (0)