mirror of
https://github.com/tj-actions/branch-names.git
synced 2024-11-23 17:03:51 +08:00
Update README.md
This commit is contained in:
parent
e66b8b3a13
commit
0f4c59d1b2
15
README.md
15
README.md
@ -46,13 +46,24 @@ on:
|
||||
if: steps.branch-name.outputs.is_default == 'true'
|
||||
run: |
|
||||
echo "Running on default: ${{ steps.branch-name.outputs.current_branch }}"
|
||||
# Outputs: "Running on default: main".
|
||||
# Outputs: "Running on default: main"
|
||||
|
||||
- name: Running on a pull request branch.
|
||||
if: steps.branch-name.outputs.is_default == 'false'
|
||||
run: |
|
||||
echo "Running on pr: ${{ steps.branch-name.outputs.current_branch }}"
|
||||
# Outputs: "Running on pr: feature/test".
|
||||
# Outputs: "Running on pr: feature/test"
|
||||
|
||||
- name: Running on a pull request branch.
|
||||
if: steps.branch-name.outputs.is_default == 'false'
|
||||
run: |
|
||||
echo "Base branch: ${{ steps.branch-name.outputs.base_ref_branch }}"
|
||||
# Outputs: "Base branch: main"
|
||||
|
||||
- name: Running on any event
|
||||
run: |
|
||||
echo "Default branch: ${{ steps.branch-name.outputs.default_branch }}"
|
||||
# Outputs: "Default branch: main"
|
||||
```
|
||||
|
||||
If you feel generous and want to show some extra appreciation:
|
||||
|
Loading…
Reference in New Issue
Block a user