File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -13,16 +13,15 @@ jobs:
13
13
- name : Checkout code
14
14
uses : actions/checkout@v3
15
15
16
- - name : Get last commit message
17
- id : commit_message
18
- run : echo "COMMIT_MESSAGE =$(git log -1 --pretty=%B )" >> $GITHUB_ENV
16
+ - name : Get branch name
17
+ id : get_branch_name
18
+ run : echo "BRANCH_NAME =$(git symbolic-ref --short HEAD )" >> $GITHUB_ENV
19
19
20
20
- name : Extract version from branch name
21
21
id : extract_version
22
22
run : |
23
- BRANCH_NAME=$(echo ${{ github.head_ref }} | sed 's/refs\/heads\///')
24
- if [[ $BRANCH_NAME =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
25
- echo "VERSION=$BRANCH_NAME" >> $GITHUB_ENV
23
+ if [[ "${{ env.BRANCH_NAME }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
24
+ echo "VERSION=${{ env.BRANCH_NAME }}" >> $GITHUB_ENV
26
25
else
27
26
echo "VERSION=" >> $GITHUB_ENV
28
27
fi
You can’t perform that action at this time.
0 commit comments