mirror of
https://github.com/tj-actions/branch-names.git
synced 2024-12-27 14:27:59 +08:00
Merge branch 'main' into upgrade-to-v2.2
This commit is contained in:
commit
b50518e8bc
12
README.md
12
README.md
@ -26,6 +26,18 @@ Get branch information without the `/ref/*` prefix
|
|||||||
id: branch-name
|
id: branch-name
|
||||||
uses: tj-actions/branch-names@v2.2
|
uses: tj-actions/branch-names@v2.2
|
||||||
|
|
||||||
|
- 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
|
- name: Current branch name
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user