diff --git a/README.md b/README.md index 243e2b2..1dba13b 100644 --- a/README.md +++ b/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 | diff --git a/action.yml b/action.yml index ae4359e..b324367 100644 --- a/action.yml +++ b/action.yml @@ -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