Skip to content

Commit

Permalink
Create an auto-deploy file
Browse files Browse the repository at this point in the history
  • Loading branch information
snehapar9 committed Aug 20, 2023
1 parent 24914ee commit f07b32e
Showing 1 changed file with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Trigger auto deployment for dummy-app-sample-3

# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ main ]
paths:
- '**'
- '.github/workflows/dummy-app-sample-3-AutoDeployTrigger-c573ea08-5636-4b7c-a445-7a3021095cbe.yml'

# Allow mannually 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.DUMMYAPPSAMPLE3_AZURE_CREDENTIALS }}

- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v1
with:
appSourcePath: ${{ github.workspace }}
registryUrl: snehaparacr.azurecr.io
registryUsername: ${{ secrets.DUMMYAPPSAMPLE3_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.DUMMYAPPSAMPLE3_REGISTRY_PASSWORD }}
containerAppName: dummy-app-sample-3
resourceGroup: ca-snehapar-group
imageToBuild: snehaparacr.azurecr.io/dummy-app-sample-3:${{ github.sha }}




0 comments on commit f07b32e

Please sign in to comment.