Skip to content

Commit 1e1612e

Browse files
committed
๐Ÿš€ Main branch์—์„œ push๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด ์‹ค์ œ ์„œ๋น„์Šค ์ด๋ฏธ์ง€๋กœ push๋˜๋„๋ก ์ถ”๊ฐ€
1 parent 8e56845 commit 1e1612e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

โ€Ž.github/workflows/upload_docker_image_to_acr.ymlโ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build and Push Backend Image to ACR
33
# ์›Œํฌํ”Œ๋กœ์šฐ ํŠธ๋ฆฌ๊ฑฐ ์„ค์ •
44
on:
55
push:
6-
branches: [ dev-test ] # TODO(Godeok Kim): dev ๋ธŒ๋žœ์น˜์— push๋  ๋•Œ๋งŒ ์‹คํ–‰ํ•˜๋Š” ๊ฒƒ์œผ๋กœ ํ–ˆ์œผ๋‚˜ ์ดํ›„ ํ…Œ์ŠคํŠธ์™€ ๋ฉ”์ธ์„ ๋ถ„๋ฆฌํ•˜๋Š” ์ž‘์—…์ด ํ•„์š”
6+
branches: [ dev-test, main ] # dev-test์™€ main ๋ธŒ๋žœ์น˜์— push๋  ๋•Œ ์‹คํ–‰
77
workflow_dispatch: {} # GitHub Actions ํƒญ์—์„œ ์ˆ˜๋™์œผ๋กœ ์‹คํ–‰ ๊ฐ€๋Šฅ
88

99
jobs:
@@ -33,7 +33,7 @@ jobs:
3333
id: meta # ์ด step์˜ ์ถœ๋ ฅ์„ ์ฐธ์กฐํ•˜๊ธฐ ์œ„ํ•œ ID
3434
uses: docker/metadata-action@v5
3535
with:
36-
images: ${{ secrets.ACR_LOGIN_SERVER }}/${{ secrets.ACR_REPOSITORY_NAME_TEST }}
36+
images: ${{ secrets.ACR_LOGIN_SERVER }}/${{ github.ref == 'refs/heads/dev-test' && secrets.ACR_REPOSITORY_NAME_TEST || secrets.ACR_REPOSITORY_NAME }}
3737
# ์˜ˆ์‹œ ํƒœ๊ทธ: main ๋ธŒ๋žœ์น˜๋ฉด latest, ๊ทธ ์™ธ์—๋Š” ๋ธŒ๋žœ์น˜๋ช…, ๊ทธ๋ฆฌ๊ณ  ํ•ญ์ƒ Git SHA ํƒœ๊ทธ ์ถ”๊ฐ€
3838
tags: |
3939
type=ref,event=branch
@@ -58,4 +58,4 @@ jobs:
5858
echo "${{ steps.meta.outputs.tags }}"
5959
echo "Checking image in ACR..."
6060
echo "Basic tag information:"
61-
az acr repository show-tags --name ${{ secrets.ACR_LOGIN_SERVER }} --repository ${{ secrets.ACR_REPOSITORY_NAME_TEST }} --output table
61+
az acr repository show-tags --name ${{ secrets.ACR_LOGIN_SERVER }} --repository ${{ github.ref == 'refs/heads/dev-test' && secrets.ACR_REPOSITORY_NAME_TEST || secrets.ACR_REPOSITORY_NAME }} --output table

0 commit comments

Comments
ย (0)