File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Returns the current branch name
2
+ description : Returns the current branch name
3
+ outputs :
4
+ branch-name :
5
+ description : The name of the current branch
6
+ value : ${{ steps.determine-branch-name.outputs.branch-name }}
7
+ runs :
8
+ using : " composite"
9
+ steps :
10
+ - name : Get branch name (merge)
11
+ if : github.event_name != 'pull_request'
12
+ shell : bash
13
+ run : |
14
+ echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
15
+
16
+ - name : Get branch name (pull request)
17
+ if : github.event_name == 'pull_request'
18
+ shell : bash
19
+ run : |
20
+ echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV
21
+
22
+ - name : BRANCH_NAME
23
+ id : determine-branch-name
24
+ shell : bash
25
+ run : |
26
+ echo "::set-output name=branch-name::$(echo ${{ env.BRANCH_NAME }} | tr a-z A-Z)"
You can’t perform that action at this time.
0 commit comments