mirror of
https://github.com/tj-actions/branch-names.git
synced 2024-11-23 17:23:50 +08:00
Update README.md
This commit is contained in:
parent
4c482f9295
commit
cef10ce0a6
30
README.md
30
README.md
@ -5,6 +5,17 @@ branch-names
|
||||
|
||||
Get branch information without the `/ref/*` prefix
|
||||
|
||||
## Outputs
|
||||
|
||||
| Output | type | Example | Description |
|
||||
|:--------------------:|:-----------:|:---------------------------:|:-----------------------------------------------------------:|
|
||||
| current_branch | `string` | `main` or `feature/test` | Always returns the branch that triggered the workflow run. |
|
||||
| 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` OR `main` | The branch that triggered the workflow run |
|
||||
|
||||
|
||||
|
||||
```yaml
|
||||
...
|
||||
steps:
|
||||
@ -66,25 +77,6 @@ on:
|
||||
```
|
||||
|
||||
|
||||
## Inputs
|
||||
|
||||
| Input | type | required | default |
|
||||
|:-------------:|:-----------:|:-------------:|:---------------------:|
|
||||
| token | `string` | `false` | `${{ github.token }}` |
|
||||
|
||||
|
||||
|
||||
|
||||
## Outputs
|
||||
|
||||
| Output | type | Example | Description |
|
||||
|:--------------------:|:-----------:|:---------------------:|:------------------------------------------------:|
|
||||
| current_branch | `string` | `main` | Always returns the branch that triggered the workflow run. |
|
||||
| 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` OR `main` | The branch that triggered the workflow run |
|
||||
|
||||
|
||||
|
||||
* Free software: [MIT license](LICENSE)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user