Skip to content

Commit

Permalink
Merge branch 'main' into feature/update-readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Tonye Jack committed Dec 11, 2020
2 parents 11f3896 + 12ee335 commit 52eebe6
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
branch-name
-----------
branch-names
------------

Get branch information without the `/ref/*` prefix

Expand All @@ -12,17 +12,20 @@ Get branch information without the `/ref/*` prefix
id: branch-names
- name: Get Ref brach name
run: |
echo "${{ steps.branch-name.outputs.ref_branch }}" # Outputs: "main"
echo "${{ steps.branch-name.outputs.ref_branch }}"
# Outputs: "main" for non PR branches | "1/merge" for a PR branch

- name: Get Head Ref branch name
if: github.event_name == 'pull_request'
run: |
echo "${{ steps.branch-name.outputs.head_ref_branch }}" # Outputs: "feature/test"
echo "${{ steps.branch-name.outputs.head_ref_branch }}"
# Outputs: "feature/test" current PR branch.

- name: Get Base Ref branch name
if: github.event_name == 'pull_request'
run: |
echo "${{ steps.branch-name.outputs.base_ref_branch }}" # Outputs: "1/merge"
echo "${{ steps.branch-name.outputs.base_ref_branch }}"
# Outputs: "main" for main <- PR branch.
```


Expand Down

0 comments on commit 52eebe6

Please sign in to comment.