Files
Iain Sproat 51a71e26b2 ci(publishing): test & hotfix branches will publish helm chart to named OCI repository (#5536)
* allow chart name to be customised
* Calculate the chart name in github workflow
* publish of helm chart allows registry & repository to be configured (Helm chart currently publishes to ghcr)
2025-09-25 13:57:24 +01:00

26 lines
628 B
Bash

#!/bin/bash
set -eo pipefail
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
# shellcheck disable=SC1090,SC1091
source "${SCRIPT_DIR}/common.sh"
if [[ "${GITHUB_REF_NAME}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "speckle-server-chart"
exit 0
fi
if [[ "${GITHUB_REF_NAME}" == "main" ]]; then
echo "speckle-server-chart"
exit 0
fi
# if branch name truncated contains an underscore, we should exit
if [[ "${BRANCH_NAME_TRUNCATED}" =~ "_" ]]; then
echo "Branch name contains an underscore, exiting"
exit 1
fi
echo "speckle-server-chart-${BRANCH_NAME_TRUNCATED}"
exit 0