Skip to content

Commit b2777b1

Browse files
Update docker-build-push.yml
1 parent 422cba7 commit b2777b1

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/docker-build-push.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,17 @@ jobs:
4343

4444
- name: Determine Tag Name Based on Branch
4545
id: determine_tag
46-
run: echo "tagname=${{ github.ref_name == 'main' && 'latest' || github.ref_name == 'dev' && 'dev' || github.ref_name == 'demo' && 'demo' || github.head_ref || 'default' }}" >> $GITHUB_OUTPUT
47-
46+
run: |
47+
if [[ "${{ github.ref_name }}" == "main" ]]; then
48+
echo "tagname=latest" >> $GITHUB_OUTPUT
49+
elif [[ "${{ github.ref_name }}" == "dev" ]]; then
50+
echo "tagname=dev" >> $GITHUB_OUTPUT
51+
elif [[ "${{ github.ref_name }}" == "demo" ]]; then
52+
echo "tagname=demo" >> $GITHUB_OUTPUT
53+
else
54+
echo "tagname=default" >> $GITHUB_OUTPUT
55+
fi
56+
4857
- name: Build Docker Image and optionally push
4958
uses: docker/build-push-action@v6
5059
with:

0 commit comments

Comments
 (0)