From 2b1d4656c023221002732b2248ab13d3f810bd24 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Tue, 29 Dec 2020 09:05:11 -0500 Subject: [PATCH 1/5] Update action.yml --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index ae4359e..e8dfe3d 100644 --- a/action.yml +++ b/action.yml @@ -40,7 +40,7 @@ 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\//}" + echo "::set-output name=ref_branch::${${REF/refs\/pull\//}/refs\/heads\//}" shell: bash branding: icon: git-branch From f3c06da963920fb10879e1abb682b51156944b86 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Tue, 29 Dec 2020 09:09:20 -0500 Subject: [PATCH 2/5] Update action.yml --- action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index e8dfe3d..c7ea824 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\//}/refs\/heads\//}" + REF_BRANCH=${REF/refs\/pull\//} + echo "::set-output name=ref_branch::${$REF_BRANCH/refs\/heads\//}" shell: bash branding: icon: git-branch From 1979d5700a8bd773119b22ba37251ff1ef801c74 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Tue, 29 Dec 2020 09:11:26 -0500 Subject: [PATCH 3/5] Update action.yml --- action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index c7ea824..db05100 100644 --- a/action.yml +++ b/action.yml @@ -40,8 +40,9 @@ 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\//}" + // For pull requests REF_BRANCH=${REF/refs\/pull\//} - echo "::set-output name=ref_branch::${$REF_BRANCH/refs\/heads\//}" + echo "::set-output name=ref_branch::${REF_BRANCH/refs\/heads\//}" shell: bash branding: icon: git-branch From 3d4892e92d9e0ee1bd43df268f1e20b3ab6cae56 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Tue, 29 Dec 2020 09:12:30 -0500 Subject: [PATCH 4/5] Update action.yml --- action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/action.yml b/action.yml index db05100..b324367 100644 --- a/action.yml +++ b/action.yml @@ -40,7 +40,6 @@ 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\//}" - // For pull requests REF_BRANCH=${REF/refs\/pull\//} echo "::set-output name=ref_branch::${REF_BRANCH/refs\/heads\//}" shell: bash From 6f89b5fcf50d9b3e231424431bbac114d981575e Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Tue, 29 Dec 2020 09:15:18 -0500 Subject: [PATCH 5/5] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 |