Skip to content

Commit ac388b9

Browse files
committed
chore: use commit sha for image tagging
Signed-off-by: Ruben Romero Montes <rromerom@redhat.com>
1 parent 8e3cc3c commit ac388b9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/push-to-registry.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@ jobs:
4747
VERSION="${{ github.ref_name }}"
4848
VERSION="${VERSION#v}"
4949
else
50-
# For branch pushes (like main), use base version with -dev suffix
50+
# For branch pushes (like main), use base version with -dev suffix and commit SHA
5151
BASE_VERSION=$(node -p "require('./package.json').version" | sed -E 's/-ea[.-][0-9]+$//')
5252
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
53-
VERSION="${BASE_VERSION}-dev"
53+
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
54+
VERSION="${BASE_VERSION}-ea-${SHORT_SHA}"
5455
else
5556
VERSION="$BASE_VERSION"
5657
fi

0 commit comments

Comments
 (0)