From d584a1ac23ffd8a1ba8313832bd56cb372a2100f Mon Sep 17 00:00:00 2001 From: HarshitMCT Date: Wed, 22 Apr 2026 15:00:47 +0530 Subject: [PATCH 1/4] Add GitHub Actions workflow for Azure deployment --- .github/workflows/main.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..14827e2b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,37 @@ +on: [push] +name: Linux_Container_Workflow + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + # checkout the repo + - name: 'Checkout GitHub Action' + uses: actions/checkout@main + + - name: 'Login via Azure CLI' + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - name: 'Build and push image' + uses: azure/docker-login@v1 + with: + login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }} + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + - run: | + docker build . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/sampleapp:${{ github.sha }} + docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/sampleapp:${{ github.sha }} + + - name: 'Deploy to Azure Container Instances' + uses: 'azure/aci-deploy@v1' + with: + resource-group: ${{ secrets.RESOURCE_GROUP }} + dns-name-label: ${{ secrets.RESOURCE_GROUP }}${{ github.run_number }} + image: ${{ secrets.REGISTRY_LOGIN_SERVER }}/sampleapp:${{ github.sha }} + registry-login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }} + registry-username: ${{ secrets.REGISTRY_USERNAME }} + registry-password: ${{ secrets.REGISTRY_PASSWORD }} + name: aci-sampleapp + location: 'west us' From dc045e73965ea755616c813aa0972c108eb44306 Mon Sep 17 00:00:00 2001 From: HarshitMCT Date: Wed, 22 Apr 2026 15:11:18 +0530 Subject: [PATCH 2/4] Change location of registry from 'west us' to 'Canada Central' --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 14827e2b..64812428 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,4 +34,4 @@ jobs: registry-username: ${{ secrets.REGISTRY_USERNAME }} registry-password: ${{ secrets.REGISTRY_PASSWORD }} name: aci-sampleapp - location: 'west us' + location: 'Canada Central' From 3c77021812c0dbad16d97a0ccc9c0c0833e9f2ad Mon Sep 17 00:00:00 2001 From: HarshitMCT Date: Wed, 22 Apr 2026 15:13:57 +0530 Subject: [PATCH 3/4] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 64812428..07768d10 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,5 +33,5 @@ jobs: registry-login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }} registry-username: ${{ secrets.REGISTRY_USERNAME }} registry-password: ${{ secrets.REGISTRY_PASSWORD }} - name: aci-sampleapp + name: aci-sampleapp-hg location: 'Canada Central' From 1c75067717220979885d619a8dc865b343aa414d Mon Sep 17 00:00:00 2001 From: HarshitMCT Date: Wed, 22 Apr 2026 15:31:11 +0530 Subject: [PATCH 4/4] Add new Test.txt for PR code review --- Test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 Test.txt diff --git a/Test.txt b/Test.txt new file mode 100644 index 00000000..fe88d228 --- /dev/null +++ b/Test.txt @@ -0,0 +1 @@ +I am a new file for PRs where code review and merge will happen.