Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Jun 1, 2021
1 parent 9bc993e commit 64a68dc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ Get branch or tag information without the `/ref/*` prefix
- name: Get branch names
id: branch-name
uses: tj-actions/branch-names@v4.3

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

- name: Current branch name
if: github.event_name == 'push'
run: |
echo "${{ steps.branch-name.outputs.current_branch }}"
# Outputs: "main" the branch that triggered the push event.
```

## Examples
Expand Down

0 comments on commit 64a68dc

Please sign in to comment.