Skip to content

Commit 5ca2e2a

Browse files
committed
SCALRCORE-26072: Trigger go-scalr tests in fatmouse PRs
1 parent 9a3f7df commit 5ca2e2a

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/pr.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ on:
1313
required: true
1414
pr_branch:
1515
description: Pull request branch
16+
base_branch:
17+
description: Base branch of pull request
1618
concurrency:
1719
group: ${{ github.ref }}-${{ github.workflow }}
1820
cancel-in-progress: true
@@ -105,10 +107,17 @@ jobs:
105107
FATMOUSE_BRANCH="--fatmouse-branch ${{ inputs.pr_branch }}"
106108
SCALR_BRANCH="--scalr-branch ${{ inputs.pr_branch }}"
107109
108-
if [ "${{ inputs.pr_branch }}" = "staging" ]; then
109-
IMAGE="--scalr-server-image-tag staging"
110+
TEV2_BRANCH=${{ inputs.pr_branch }}
111+
NORMALIZED_BRANCH=$(echo $TEV2_BRANCH | tr / - | tr '[:upper:]' '[:lower:]')
112+
if docker manifest inspect eu.gcr.io/development-156220/fatmouse/scalr-server-te:${NORMALIZED_BRANCH} ; then
113+
IMAGE="--scalr-server-image-tag ${NORMALIZED_BRANCH}"
110114
else
111-
IMAGE=""
115+
if [[ "${{ inputs.base_branch }}" == release/* ]]; then
116+
NORMALIZED_IMAGE=$(echo "${{ inputs.base_branch }}" | tr / - | tr '[:upper:]' '[:lower:]')
117+
IMAGE="--scalr-server-image-tag ${NORMALIZED_IMAGE}"
118+
else
119+
IMAGE=""
120+
fi
112121
fi
113122
114123
docker run --rm \

0 commit comments

Comments
 (0)