mirror of
https://github.com/tj-actions/branch-names.git
synced 2024-11-23 20:33:52 +08:00
Update README.md
This commit is contained in:
parent
a6349ed704
commit
2323263ff8
16
README.md
16
README.md
@ -45,17 +45,17 @@ on:
|
|||||||
id: branch-name
|
id: branch-name
|
||||||
uses: tj-actions/branch-names@v4.3
|
uses: tj-actions/branch-names@v4.3
|
||||||
|
|
||||||
- name: Current branch name
|
- name: Running on the default branch.
|
||||||
if: github.event_name == 'push'
|
if: steps.branch-name.outputs.is_default == 'true'
|
||||||
run: |
|
run: |
|
||||||
echo "${{ steps.branch-name.outputs.current_branch }}"
|
echo "Running on default: ${{ steps.branch-name.outputs.current_branch }}"
|
||||||
# Outputs: "main" the branch that triggered the push event.
|
# Outputs: "Running on default: main".
|
||||||
|
|
||||||
- name: Current branch name
|
- name: Running on a pull request branch.
|
||||||
if: github.event_name == 'pull_request'
|
if: steps.branch-name.outputs.is_default == 'false'
|
||||||
run: |
|
run: |
|
||||||
echo "${{ steps.branch-name.outputs.current_branch }}"
|
echo "Running on pr: ${{ steps.branch-name.outputs.current_branch }}"
|
||||||
# Outputs: "feature/test" the current PR branch.
|
# Outputs: "Running on pr: feature/test".
|
||||||
```
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
Loading…
Reference in New Issue
Block a user