mirror of
https://github.com/tj-actions/branch-names.git
synced 2024-12-27 14:27:59 +08:00
Merge pull request #5 from tj-actions/feature/ensure-the-ref-branch-output-is-correct
This commit is contained in:
commit
8307330ac5
10
README.md
10
README.md
@ -61,11 +61,11 @@ on:
|
||||
|
||||
## Outputs
|
||||
|
||||
| Output | type | Example | Description |
|
||||
|:--------------------:|:-----------:|:-----------------:|:------------------------------------------------:|
|
||||
| base_ref_branch | `string` | `main` | The target branch of a pull request |
|
||||
| head_ref_branch | `string` | `feature/test` | The source branch of a pull request |
|
||||
| ref_branch | `string` | `1/merge` | The branch that triggered the workflow run |
|
||||
| Output | type | Example | Description |
|
||||
|:--------------------:|:-----------:|:---------------------:|:------------------------------------------------:|
|
||||
| base_ref_branch | `string` | `main` | The target branch of a pull request |
|
||||
| head_ref_branch | `string` | `feature/test` | The source branch of a pull request |
|
||||
| ref_branch | `string` | `1/merge` | `main` | The branch that triggered the workflow run |
|
||||
|
||||
|
||||
|
||||
|
@ -40,7 +40,8 @@ runs:
|
||||
export REF=${{ inputs.ref }}
|
||||
echo "::set-output name=base_ref_branch::${BASE_REF/refs\/heads\//}"
|
||||
echo "::set-output name=head_ref_branch::${HEAD_REF/refs\/heads\//}"
|
||||
echo "::set-output name=ref_branch::${REF/refs\/pull\//}"
|
||||
REF_BRANCH=${REF/refs\/pull\//}
|
||||
echo "::set-output name=ref_branch::${REF_BRANCH/refs\/heads\//}"
|
||||
shell: bash
|
||||
branding:
|
||||
icon: git-branch
|
||||
|
Loading…
x
Reference in New Issue
Block a user