mirror of
https://github.com/tj-actions/branch-names.git
synced 2024-12-27 14:27:59 +08:00
Update README.md
This commit is contained in:
parent
4362da7333
commit
3bd4c88eca
12
README.md
12
README.md
@ -25,6 +25,18 @@ Get branch information without the `/ref/*` prefix
|
||||
- name: Get branch names
|
||||
id: branch-name
|
||||
uses: tj-actions/branch-names@v2.1
|
||||
|
||||
- name: Running on the default branch.
|
||||
if: ${{ steps.branch-name.outputs.is_default }}
|
||||
run: |
|
||||
echo "Running on default: ${{ steps.branch-name.outputs.is_default }}"
|
||||
# Outputs: "Running on default: true".
|
||||
|
||||
- name: Running on a pull request branch.
|
||||
if: "!${{ steps.branch-name.outputs.is_default }}"
|
||||
run: |
|
||||
echo "Running on default: ${{ steps.branch-name.outputs.is_default }}"
|
||||
# Outputs: "Running on default: false".
|
||||
|
||||
- name: Current branch name
|
||||
if: github.event_name == 'pull_request'
|
||||
|
Loading…
x
Reference in New Issue
Block a user