Skip to content

Commit be4c82d

Browse files
committed
add branch action output
Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com>
1 parent 9fdec1f commit be4c82d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/tests.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,6 @@ jobs:
3636
uses: ./
3737

3838
- name: Echo data
39-
run: echo Number "${{ steps.pr.outputs.number }}" from "${{ github.event_name }} event."
39+
run: |
40+
echo Number "${{ steps.pr.outputs.number }}" from "${{ github.event_name }} event."
41+
echo Branch "${{ steps.pr.outputs.branch }}" from "${{ github.event_name }} event."

action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ runs:
2727
else
2828
# Get the PR number from the event payload or fallback on 0.
2929
number=${{ github.event.number || github.event.issue.number || 0 }}
30+
branch=${{ github.head_ref || "" }}
3031
fi
3132
echo "number=$number" >> "$GITHUB_OUTPUT"
3233

0 commit comments

Comments
 (0)