mirror of
https://github.com/tj-actions/branch-names.git
synced 2024-11-23 18:23:50 +08:00
Update README.md
This commit is contained in:
parent
7339591b43
commit
1bed57bf19
12
README.md
12
README.md
@ -27,16 +27,16 @@ Get branch information without the `/ref/*` prefix
|
||||
uses: tj-actions/branch-names@v2.2
|
||||
|
||||
- name: Running on the default branch.
|
||||
if: ${{ steps.branch-name.outputs.is_default }}
|
||||
if: steps.branch-name.outputs.is_default == 'true'
|
||||
run: |
|
||||
echo "Running on default: ${{ steps.branch-name.outputs.is_default }}"
|
||||
# Outputs: "Running on default: true".
|
||||
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 }}"
|
||||
if: steps.branch-name.outputs.is_default == 'false'
|
||||
run: |
|
||||
echo "Running on default: ${{ steps.branch-name.outputs.is_default }}"
|
||||
# Outputs: "Running on default: false".
|
||||
echo "Running on pr: ${{ steps.branch-name.outputs.current_branch }}"
|
||||
# Outputs: "Running on pr: feature/test".
|
||||
|
||||
- name: Current branch name
|
||||
if: github.event_name == 'pull_request'
|
||||
|
Loading…
Reference in New Issue
Block a user