Get the active branch in the workflow.
The basic usage will be as follows:
- uses: grandmasterdev/github-action-get-branch@latest
steps:
- id: get-branch
uses: grandmasterdev/github-action-get-branch@latest
- name: using output
run: |
echo ${{steps.get-branch.outputs.branch-name}}
jobs:
job1:
runs-on: ubuntu-latest
outputs:
branch-name: ${{steps.get-branch.outputs.branch-name}}
steps:
- id: get-branch
uses: grandmasterdev/github-action-get-branch@latest
job2:
runs-on: ubuntu-latest
steps:
- name: using output
run: |
echo ${{job1.outputs.branch-name}}