Skip to content

Commit 08e7acb

Browse files
committed
Process branch input for tests
1 parent 3aeef51 commit 08e7acb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88
branches:
99
- main
1010
workflow_dispatch:
11+
inputs:
12+
branch:
13+
description: "Branch name to checkout and run tests for"
14+
required: false
15+
default: "refs/heads/main"
16+
type: string
1117

1218
concurrency:
1319
group: ${{ github.ref }}-${{ github.workflow }}
@@ -24,6 +30,7 @@ jobs:
2430
- name: Checkout Code
2531
uses: actions/checkout@v6
2632
with:
33+
ref: ${{ inputs.branch || 'refs/heads/main' }}
2734
fetch-depth: 0
2835

2936
- uses: actions/setup-go@v6
@@ -42,6 +49,7 @@ jobs:
4249
- name: Checkout Code
4350
uses: actions/checkout@v6
4451
with:
52+
ref: ${{ inputs.branch || 'refs/heads/main' }}
4553
fetch-depth: 0
4654

4755
- uses: actions/setup-go@v6

0 commit comments

Comments
 (0)