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)
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user