Skip to content

Commit d9c404d

Browse files
chore (publish): allow specifying version tag for docker workflow
1 parent f4b0b77 commit d9c404d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/docker-image.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
repository_dispatch:
77
types: [publish_docker]
88
workflow_dispatch:
9+
inputs:
10+
version:
11+
description: "Version tag to build (e.g., 9.2.0)"
12+
required: true
13+
type: string
914

1015
jobs:
1116
build:
@@ -14,9 +19,14 @@ jobs:
1419
steps:
1520
- uses: actions/checkout@v2
1621

17-
- name: Extract version from payload
22+
- name: Resolve version
1823
id: get_version
19-
run: echo "version=${{ github.event.client_payload.version }}" >> $GITHUB_OUTPUT
24+
env:
25+
INPUT_VERSION: ${{ inputs.version }}
26+
PAYLOAD_VERSION: ${{ github.event.client_payload.version }}
27+
run: |
28+
VERSION="${INPUT_VERSION:-${PAYLOAD_VERSION}}"
29+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
2030
- name: Get Version For Release
2131
id: get_version_release
2232
uses: battila7/get-version-action@v2.2.1

0 commit comments

Comments
 (0)