Skip to content

Commit 52c2260

Browse files
committed
Bugfix in stable PR builds
* The acmesh version was not determined properly. * PR builds to stable branches are failing.
1 parent b15a53d commit 52c2260

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/scripts/get_parameters.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ get_parameters() {
4040
if [[ $GITHUB_BASE_REF == "$LATEST_BRANCH" ]]; then
4141
echo "** Pull Request is based on latest branch $GITHUB_BASE_REF will use $LATEST_ACMESH_VERSION"
4242
ACMESH_VERSION="$LATEST_ACMESH_VERSION"
43-
elif [[ $GITHUB_BASE_REF == "$STABLE_BRANCH" ]]; then
44-
echo "** Pull Request is based on stable branch $GITHUB_BASE_REF will use $STABLE_ACMESH_VERSION"
45-
ACMESH_VERSION="$STABLE_ACMESH_VERSION"
43+
elif [[ $GITHUB_BASE_REF =~ $STABLE_BRANCH_PREFIX_ESCAPED ]]; then
44+
ACMESH_VERSION="${GITHUB_BASE_REF#$STABLE_BRANCH_PREFIX_ESCAPED}"
45+
echo "** Pull Request is based on stable branch $GITHUB_BASE_REF will use $ACMESH_VERSION"
4646
else
4747
echo "** Pull Request is based on $GITHUB_BASE_REF branch and no rule for acme version set, will use $LATEST_ACMESH_VERSION"
48-
ACMESH_VERSION="${GITHUB_BASE_REF}"
48+
ACMESH_VERSION="${LATEST_ACMESH_VERSION}"
4949
fi
5050
# Tag Format: <base_os>-<acmesh-version>-<date-stamp>-<platform>-pr<pr_number>
5151
DOCKER_IMAGE_TAG="${BASE_IMAGE}-${ACMESH_VERSION}-${DATE_STAMP}-$(echo "${PLATFORM}" | tr '/' '_')-pr${PULL_REQUEST_NUMBER}s"

0 commit comments

Comments
 (0)