Skip to content

Commit fdcec1e

Browse files
author
Harmanpreet Kaur
committed
edit9
1 parent 257d0f5 commit fdcec1e

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

.github/workflows/docker-build.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,20 @@ jobs:
4343

4444
- name: Output ACR Login Server
4545
run: |
46-
echo "ACR Login Server (partial): ${secrets.ACR_LOGIN_SERVER:0:5}****"
46+
echo "ACR Login Server: ${{ secrets.ACR_LOGIN_SERVER }}"
4747
4848
- name: Determine Tag Name Based on Branch
4949
id: determine_tag
5050
run: |
51-
if [[ "${{ github.ref_name }}" == "main" ]]; then
52-
echo "tagname=latest" >> $GITHUB_OUTPUT
53-
elif [[ "${{ github.ref_name }}" == "dev" ]]; then
54-
echo "tagname=dev" >> $GITHUB_OUTPUT
55-
elif [[ "${{ github.ref_name }}" == "demo" ]]; then
56-
echo "tagname=demo" >> $GITHUB_OUTPUT
57-
else
58-
echo "tagname=default" >> $GITHUB_OUTPUT
59-
60-
fi
51+
if [[ "${{ github.ref_name }}" == "main" ]]; then
52+
echo "tagname=${{ secrets.ACR_LOGIN_SERVER }}/km-app:latest" >> $GITHUB_OUTPUT
53+
elif [[ "${{ github.ref_name }}" == "dev" ]]; then
54+
echo "tagname=${{ secrets.ACR_LOGIN_SERVER }}/km-app:dev" >> $GITHUB_OUTPUT
55+
elif [[ "${{ github.ref_name }}" == "demo" ]]; then
56+
echo "tagname=${{ secrets.ACR_LOGIN_SERVER }}/km-app:demo" >> $GITHUB_OUTPUT
57+
else
58+
echo "tagname=${{ secrets.ACR_LOGIN_SERVER }}/km-app:default" >> $GITHUB_OUTPUT
59+
fi
6160
- name: Build and Push Docker Image for WebApp
6261
uses: docker/build-push-action@v6
6362
with:
@@ -75,8 +74,8 @@ jobs:
7574
file: ./AzureFunctions/km-rag-function/Dockerfile
7675
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' }}
7776
tags: |
78-
${{ secrets.ACR_LOGIN_SERVER }}/km-rag-function:${{ steps.determine_tag.outputs.tagname }}
79-
${{ secrets.ACR_LOGIN_SERVER }}/km-rag-function:${{ steps.determine_tag.outputs.tagname }}_${{ steps.date.outputs.date }}_${{ github.run_number }}
77+
${{ steps.determine_tag.outputs.tagname }}
78+
${{ steps.determine_tag.outputs.tagname }}_${{ steps.date.outputs.date }}_${{ github.run_number }}
8079
8180
- name: Build and Push Docker Image for km-charts-function
8281
uses: docker/build-push-action@v6

0 commit comments

Comments
 (0)