Skip to content

Commit

Permalink
enable default build
Browse files Browse the repository at this point in the history
  • Loading branch information
visoedhwa committed Sep 13, 2024
1 parent a8b63b1 commit f5fe45e
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# name: Docker Build Image and Deploy to Azure Container Registry
# on:
# push:
# branches: ["main"]
# pull_request:
# branches: ["main"]
name: Docker Build Image and Deploy to Azure Container Registry
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

# jobs:
# build:
# runs-on: ubuntu-latest
jobs:
build:
runs-on: ubuntu-latest

# steps:
steps:

# - name: Checkout repo
# uses: actions/checkout@v4
- name: Checkout repo
uses: actions/checkout@v4

# - name: Login to ACR
# uses: docker/login-action@v3
# with:
# registry: ${{ secrets.AZURE_REGISTRY }}
# username: ${{ secrets.AZURE_CLIENT_ID }}
# password: ${{ secrets.AZURE_CLIENT_SECRET }}
- name: Login to ACR
uses: docker/login-action@v3
with:
registry: ${{ secrets.AZURE_REGISTRY }}
username: ${{ secrets.AZURE_CLIENT_ID }}
password: ${{ secrets.AZURE_CLIENT_SECRET }}

# - name: Build, tag, and push image to Azure Container Registry
# env:
# AZURE_REGISTRY: ${{ secrets.AZURE_REGISTRY }}
# REPO_NAME: ${{ github.event.repository.name }}
# IMAGE_TAG: latest
# run: |
# docker build -t $AZURE_REGISTRY/$REPO_NAME:$IMAGE_TAG .
# docker push $AZURE_REGISTRY/$REPO_NAME:$IMAGE_TAG
- name: Build, tag, and push image to Azure Container Registry
env:
AZURE_REGISTRY: ${{ secrets.AZURE_REGISTRY }}
REPO_NAME: ${{ github.event.repository.name }}
IMAGE_TAG: latest
run: |
docker build -t $AZURE_REGISTRY/$REPO_NAME:$IMAGE_TAG .
docker push $AZURE_REGISTRY/$REPO_NAME:$IMAGE_TAG

0 comments on commit f5fe45e

Please sign in to comment.