Skip to content

Commit

Permalink
use commit hash in image tag instead of git tag
Browse files Browse the repository at this point in the history
  • Loading branch information
psegedy committed Sep 30, 2024
1 parent ccd7bdf commit 5ccfee1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''
Expand Down

0 comments on commit 5ccfee1

Please sign in to comment.