Skip to content

Commit

Permalink
gh-actions/github/checkout: Add branch name output (#907)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <ryan@synca.io>
  • Loading branch information
phlax committed Oct 28, 2023
1 parent 19f2ebd commit 0d8b6ca
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions gh-actions/github/checkout/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ inputs:
committer-email:
type: string
default:
strip-prefix:
type: string
default:

outputs:
token:
value: ${{ steps.appauth.outputs.token }}
branch_name:
value: ${{ steps.branch.outputs.name }}


runs:
Expand Down Expand Up @@ -54,3 +59,10 @@ runs:
COMMITTER_NAME: ${{ inputs.committer-name }}
COMMITTER_EMAIL: ${{ inputs.committer-email }}
shell: bash
- run: |
REF_NAME="$(git rev-parse --abbrev-ref HEAD)"
BRANCHNAME="${REF_NAME#${{ inputs.strip-prefix }}}"
echo "name=${BRANCHNAME}" >> $GITHUB_OUTPUT
name: Get branch name
id: branch
shell: bash

0 comments on commit 0d8b6ca

Please sign in to comment.