Skip to content

Commit d5a262e

Browse files
authored
add branch name as input in the reusable workflow (#3336)
1 parent 43af294 commit d5a262e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/reusable-go-test.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Reusable Go Testing Workflow
33
on:
44
workflow_call:
55
inputs:
6+
target-branch:
7+
description: 'Branch to checkout and test (defaults to the calling branch)'
8+
required: false
9+
type: string
10+
default: ''
611
enable-status-reporting:
712
description: 'Whether to post status checks to datadog-api-spec repo'
813
required: false
@@ -32,6 +37,8 @@ jobs:
3237
steps:
3338
- name: Checkout code
3439
uses: actions/checkout@v3
40+
with:
41+
ref: ${{ inputs.target-branch || github.ref }}
3542
- name: Install Go
3643
uses: actions/setup-go@v4
3744
with:

0 commit comments

Comments
 (0)