Skip to content

Commit 6153a1c

Browse files
committed
CCM-10294: improved branch name normalizer
1 parent cbbd317 commit 6153a1c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/actions/normalize-branch-name/action.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@ name: "Normalize branch name"
22
description: "Normalize branch name"
33
outputs:
44
normalized_branch_name:
5-
description: 10 character branch identifier (0000-branch)
5+
description: generare a short branch identifier that can be used for an environment name
66
value: ${{ steps.normalize_branch_name.outputs.normalized_branch_name }}
77
runs:
88
using: "composite"
99
steps:
1010
- id: normalize_branch_name
11+
env:
12+
BRANCH: ${{ github.head_ref }}
1113
shell: bash
1214
run: |
1315
# Example: feature/CCM-00000_branch-description
14-
BRANCH=$(git rev-parse --abbrev-ref HEAD)
16+
echo "BRANCH: ${BRANCH}"
1517
1618
# Example: feature/ccm-00000_branch-description
1719
LOWER_CASE_BRANCH=$(echo $BRANCH | tr '[:upper:]' '[:lower:]')

0 commit comments

Comments
 (0)