Skip to content

Build and Push Docker Image to ACR #3

Build and Push Docker Image to ACR

Build and Push Docker Image to ACR #3

Workflow file for this run

name: Build and Push Docker Image to ACR
on:
push:
branches:
- main
workflow_dispatch: # 수동 실행을 위한 트리거
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Log in to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }} # 수정된 부분
- name: Log in to Azure Container Registry
run: az acr login --name ${{ secrets.AZURE_REGISTRY }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ secrets.AZURE_REGISTRY }}/enjoytrip_springboot:latest