We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
gh-actions/github/checkout
1 parent 19f2ebd commit 0d8b6caCopy full SHA for 0d8b6ca
1 file changed
gh-actions/github/checkout/action.yml
@@ -13,10 +13,15 @@ inputs:
13
committer-email:
14
type: string
15
default:
16
+ strip-prefix:
17
+ type: string
18
+ default:
19
20
outputs:
21
token:
22
value: ${{ steps.appauth.outputs.token }}
23
+ branch_name:
24
+ value: ${{ steps.branch.outputs.name }}
25
26
27
runs:
@@ -54,3 +59,10 @@ runs:
54
59
COMMITTER_NAME: ${{ inputs.committer-name }}
55
60
COMMITTER_EMAIL: ${{ inputs.committer-email }}
56
61
shell: bash
62
+ - run: |
63
+ REF_NAME="$(git rev-parse --abbrev-ref HEAD)"
64
+ BRANCHNAME="${REF_NAME#${{ inputs.strip-prefix }}}"
65
+ echo "name=${BRANCHNAME}" >> $GITHUB_OUTPUT
66
+ name: Get branch name
67
+ id: branch
68
+ shell: bash
0 commit comments