Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Jul 1, 2021
1 parent a6349ed commit 2323263
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ on:
id: branch-name
uses: tj-actions/branch-names@v4.3

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

- name: Current branch name
if: github.event_name == 'pull_request'
echo "Running on default: ${{ steps.branch-name.outputs.current_branch }}"
# Outputs: "Running on default: main".
- name: Running on a pull request branch.
if: steps.branch-name.outputs.is_default == 'false'
run: |
echo "${{ steps.branch-name.outputs.current_branch }}"
# Outputs: "feature/test" the current PR branch.
echo "Running on pr: ${{ steps.branch-name.outputs.current_branch }}"
# Outputs: "Running on pr: feature/test".
```

## Examples
Expand Down

0 comments on commit 2323263

Please sign in to comment.