Skip to content

Commit c105bd7

Browse files
fix(sem): Use PR number for docker image (#340)
## 📝 Description We are moving from executing CI on every branch to executing on PR's. ## ✅ Checklist - [ ] I have tested this change - [ ] This change requires documentation update
1 parent 247ab4a commit c105bd7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ TAG_NAME=$(shell git describe --exact-match --tags HEAD 2>/dev/null)
77
#
88
ifneq ($(TAG_NAME),)
99
export BRANCH?=$(shell git branch --contains tags/$(TAG_NAME) | head -n 1 | sed '/HEAD/d' | sed 's/[^a-z]//g' | cut -c 1-40)
10+
else ifneq ($(SEMAPHORE_GIT_PR_NUMBER),)
11+
export BRANCH?=pr$(SEMAPHORE_GIT_PR_NUMBER)
1012
else
1113
export BRANCH?=$(shell git rev-parse --abbrev-ref HEAD | sed 's/[^a-z]//g' | cut -c 1-40)
1214
endif

0 commit comments

Comments
 (0)