Skip to content

Commit 3f1ae71

Browse files
author
Harmanpreet Kaur
committed
edit 3
1 parent d08b9e3 commit 3f1ae71

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

.github/workflows/docker-build.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ jobs:
4444
- name: Determine Tag Name Based on Branch
4545
id: determine_tag
4646
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-
56-
fi
47+
if [[ "${{ github.ref_name }}" == "main" || "${{ github.head_ref }}" == "main" ]]; then
48+
echo "tagname=latest" >> $GITHUB_OUTPUT
49+
elif [[ "${{ github.ref_name }}" == "dev" || "${{ github.head_ref }}" == "dev" ]]; then
50+
echo "tagname=dev" >> $GITHUB_OUTPUT
51+
elif [[ "${{ github.ref_name }}" == "demo" || "${{ github.head_ref }}" == "demo" ]]; then
52+
echo "tagname=demo" >> $GITHUB_OUTPUT
53+
else
54+
echo "tagname=default" >> $GITHUB_OUTPUT
55+
fi
56+
5757
- name: Build and Push Docker Image for WebApp
5858
uses: docker/build-push-action@v6
5959
with:
@@ -62,6 +62,7 @@ jobs:
6262
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' }}
6363
tags: |
6464
${{ secrets.ACR_LOGIN_SERVER }}/km-app:${{ steps.determine_tag.outputs.tagname }}
65+
echo secrets.ACR_LOGIN_SERVER
6566
${{ secrets.ACR_LOGIN_SERVER }}/km-app:${{ steps.determine_tag.outputs.tagname }}_${{ steps.date.outputs.date }}_${{ github.run_number }}
6667
6768
- name: Build and Push Docker Image for km-rag-function

0 commit comments

Comments
 (0)