From 5df11eb7b02f4e5d3306a9d30dd96ec41a2cd85f Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Fri, 11 Dec 2020 08:52:52 -0500 Subject: [PATCH] Update README.md --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f1f97df..5c5f72a 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,19 @@ Get branch information without the `/ref/heads` prefix - name: Get branch name uses: tj-actions/branch-name@v1 id: branch-name - - name: Get brach Names + - name: Get Ref brach name + run: | + echo "${{ steps.branch-name.outputs.ref_branch }}" # Outputs: "main" + + - name: Get Head Ref branch name + if: github.event_name == 'pull_request' + run: | + echo "${{ steps.branch-name.outputs.head_ref_branch }}" + + - name: Get Base Ref branch name + if: github.event_name == 'pull_request' run: | echo "${{ steps.branch-name.outputs.base_ref_branch }}" - echo "${{ steps.branch-name.outputs.head_ref_branch }}" - echo "${{ steps.branch-name.outputs.ref_branch }}" ```