From a722ab5715d3553fb1a597918e3bf045be729fc5 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Mon, 29 Jan 2024 12:33:59 +0000 Subject: [PATCH] FIX: Fix branch tag truncation for non-bash shells --- get_deployment_info/entrypoint.sh | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/get_deployment_info/entrypoint.sh b/get_deployment_info/entrypoint.sh index 078aa8b..d404f10 100644 --- a/get_deployment_info/entrypoint.sh +++ b/get_deployment_info/entrypoint.sh @@ -40,7 +40,7 @@ if [ "$BRANCH_TAG_KEBAB" = "main" ]; then IMAGE_VERSION_TAG="$BRANCH_TAG_KEBAB-$REVISION_TAG" IMAGE_LATEST_TAG="$BRANCH_TAG_KEBAB-latest" else - REVISION_TAG=pull-"${BRANCH_TAG_KEBAB:0:12}" + REVISION_TAG=pull-$(expr substr "$BRANCH_TAG_KEBAB" 1 12) IMAGE_VERSION_TAG="$REVISION_TAG" IMAGE_LATEST_TAG="$REVISION_TAG-latest" fi diff --git a/pyproject.toml b/pyproject.toml index 18eb94e..a511d1a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "get-deployment-info" -version = "0.2.2" +version = "0.2.3" description = "A Github Action that gets the information required to build and deploy an Octue service." authors = ["Marcus Lugg "] readme = "README.md"