From 5ccfee15ed63a4632dca36217f1aae5fcc6ce492 Mon Sep 17 00:00:00 2001 From: Patrik Segedy Date: Mon, 30 Sep 2024 17:39:55 +0200 Subject: [PATCH] use commit hash in image tag instead of git tag --- .github/workflows/semantic-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml index 5e5e343d9..0e5edad30 100644 --- a/.github/workflows/semantic-release.yml +++ b/.github/workflows/semantic-release.yml @@ -17,8 +17,9 @@ jobs: VERSION=$(cat VERSION) RELEASE_TYPE=$(git log -1 | tail -n1) # Check release type (/major, /minor, /patch (default)) VERSION_NEXT=$(./scripts/increment_version.sh $VERSION $RELEASE_TYPE) + PREV_COMMIT_HASH=$(git rev-parse --short=7 HEAD) sed -i 's|\("version": "\)[^"]*\("\)$|'"\1$VERSION_NEXT\2|;" $DOC_FILE - sed -i -E "s/\{name: IMAGE_TAG_(MANAGER|LISTENER|EVALUATOR_UPLOAD|EVALUATOR_RECALC|JOBS|DATABASE_ADMIN|ADMIN), value: .*\}/{name: IMAGE_TAG_\1, value: $VERSION_NEXT}/" $CLOWDER_FILE + sed -i -E "s/\{name: IMAGE_TAG_(MANAGER|LISTENER|EVALUATOR_UPLOAD|EVALUATOR_RECALC|JOBS|DATABASE_ADMIN|ADMIN), value: .*\}/{name: IMAGE_TAG_\1, value: $PREV_COMMIT_HASH}/" $CLOWDER_FILE echo $VERSION_NEXT >VERSION git config --global user.name 'semantic-release' git config --global user.email ''