mirror of
https://github.com/tj-actions/branch-names.git
synced 2024-11-23 19:03:51 +08:00
Update README.md
This commit is contained in:
parent
7cc8adc4b4
commit
5df11eb7b0
14
README.md
14
README.md
@ -10,11 +10,19 @@ Get branch information without the `/ref/heads` prefix
|
||||
- name: Get branch name
|
||||
uses: tj-actions/branch-name@v1
|
||||
id: branch-name
|
||||
- name: Get brach Names
|
||||
- name: Get Ref brach name
|
||||
run: |
|
||||
echo "${{ steps.branch-name.outputs.ref_branch }}" # Outputs: "main"
|
||||
|
||||
- name: Get Head Ref branch name
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
echo "${{ steps.branch-name.outputs.head_ref_branch }}"
|
||||
|
||||
- name: Get Base Ref branch name
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
echo "${{ steps.branch-name.outputs.base_ref_branch }}"
|
||||
echo "${{ steps.branch-name.outputs.head_ref_branch }}"
|
||||
echo "${{ steps.branch-name.outputs.ref_branch }}"
|
||||
```
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user