Skip to content

Commit a89e8d7

Browse files
update the workflow to get branch name
1 parent 96bd4bf commit a89e8d7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/sparrowproxy-selfhost.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: Self-host Docker Image
22
on:
33
workflow_dispatch:
44
inputs:
5+
branch:
6+
description: "Git branch to build"
7+
required: true
8+
default: main
9+
type: string
510
image_version:
611
description: "Docker image version (e.g. 1.2.3)"
712
required: true
@@ -16,10 +21,14 @@ jobs:
1621
environment: self-host
1722
env:
1823
DOCKER_IMAGE_VERSION: ${{ inputs.image_version }}
24+
BUILD_BRANCH: ${{ inputs.branch }}
1925

2026
steps:
2127
- name: Checkout
2228
uses: actions/checkout@v4
29+
with:
30+
ref: ${{ env.BUILD_BRANCH }}
31+
fetch-depth: 0
2332

2433
- name: Set up QEMU
2534
uses: docker/setup-qemu-action@v3

0 commit comments

Comments
 (0)