Skip to content

Commit e4d2569

Browse files
authored
Fix workflow file (#107)
1 parent 65190b2 commit e4d2569

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/release-container-image.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@ name: release-container-image
22

33
on:
44
push:
5+
branches:
6+
- master
57
tags:
68
- '[0-9]+.[0-9]+.[0-9]+*'
79
workflow_dispatch: # Manual Trigger
10+
inputs:
11+
docker_tag:
12+
description: 'Docker tag to use'
13+
required: true
14+
default: 'dev'
815

916
jobs:
1017
docker:
@@ -21,10 +28,22 @@ jobs:
2128

2229
- name: Set up Docker Buildx
2330
uses: docker/setup-buildx-action@v3
31+
32+
- name: Get the tag
33+
run: |
34+
TAG=${{ github.ref_name }}
35+
if [[ $TAG == "master" ]]; then
36+
TAG=latest
37+
fi
38+
MANUAL_WORKFLOW_TAG=${{ inputs.docker_tag }}
39+
if [[ $MANUAL_WORKFLOW_TAG != "" ]]; then
40+
TAG=${{ inputs.docker_tag }}
41+
fi
42+
echo "Using tag $TAG"
2443
2544
- name: Build and push
2645
uses: docker/build-push-action@v6
2746
with:
2847
platforms: linux/amd64,linux/arm64
2948
push: true
30-
tags: docker.io/datastax/pulsar-admin-console:${{ github.ref_name }}
49+
tags: docker.io/datastax/pulsar-admin-console:$TAG

0 commit comments

Comments
 (0)