branch-names/action.yml
2020-12-11 08:29:07 -05:00

40 lines
1023 B
YAML

name: Get branch name
description: Retrieve giithub branch information without `/ref/heads` prefix
author: tj-actions
inputs:
token:
description: 'GITHUB_TOKEN or a Repo scoped PAT'
required: true
default: ${{ github.token }}
base_ref:
description: 'The target branch of a pull request'
default: ${{ github.base_ref }}
required: false
head_ref:
description: 'The source branch of a pull request'
default: ${{ github.head_ref }}
required: false
ref:
description: 'The branch that triggered the workflow run.'
default: ${{ github.ref }}
required: false
outputs:
base_ref_branch:
description: 'The target branch of a pull request'
head_ref_branch:
description: 'The source branch of a pull request'
ref_branch:
description: 'The branch that triggered the workflow run.'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.base_ref }}
- ${{ inputs.head_ref }}
- ${{ inputs.ref }}
branding:
icon: git-branch
color: white