Skip to content

Commit

Permalink
Create an auto-deploy file
Browse files Browse the repository at this point in the history
  • Loading branch information
sekhara627961 committed Feb 21, 2024
1 parent 97c58d9 commit 5d359c5
Showing 1 changed file with 43 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Trigger auto deployment for sk-container-app

# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ main ]
paths:
- '**'
- '.github/workflows/sk-container-app-AutoDeployTrigger-b566ba3d-0a1d-46d7-a604-9b86c0137fa1.yml'

# Allow manual trigger
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout to the branch
uses: actions/checkout@v2

- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.SKCONTAINERAPP_AZURE_CREDENTIALS }}

- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}
registryUrl: skacaregistry.azurecr.io
registryUsername: ${{ secrets.SKCONTAINERAPP_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.SKCONTAINERAPP_REGISTRY_PASSWORD }}
containerAppName: sk-container-app
resourceGroup: rg-dev-ACA-sk
imageToBuild: skacaregistry.azurecr.io/sk-container-app:${{ github.sha }}





0 comments on commit 5d359c5

Please sign in to comment.