File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 2929 uses : actions/setup-java@v4
3030 with :
3131 distribution : temurin
32- java-version : " 21 "
32+ java-version : ' 21 '
3333
3434 - name : Cache Maven repository
3535 uses : actions/cache@v4
6666 PRIMARY_TAG="$IMAGE:sha-$SHORT_SHA"
6767
6868 if [[ "${GITHUB_REF_TYPE}" == "branch" ]]; then
69- SAFE_BRANCH=$(echo "${GITHUB_REF_NAME}" | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9' '-')
69+ SAFE_BRANCH=$(echo "${GITHUB_REF_NAME}" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g; s/-\{2,\}/-/g; s/^-//; s/-$//')
70+ if [[ -z "$SAFE_BRANCH" ]]; then
71+ SAFE_BRANCH="sha-$SHORT_SHA"
72+ fi
7073 TAGS="$TAGS\n$IMAGE:branch-$SAFE_BRANCH"
7174 if [[ "${GITHUB_REF_NAME}" == "main" ]]; then
7275 VERSION=${{ steps.version.outputs.sanitized }}
You can’t perform that action at this time.
0 commit comments