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 22, 2024
1 parent e5eeaec commit 2d51c0e
Showing 1 changed file with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Trigger auto deployment for oteltestapp3

# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ main ]
paths:
- '**'
- '.github/workflows/oteltestapp3-AutoDeployTrigger-8d845533-0954-4bb4-85e8-32bf0a390f1d.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.OTELTESTAPP3_AZURE_CREDENTIALS }}

- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}
_dockerfilePathKey_: _dockerfilePath_
registryUrl: snehapark4apssacr.azurecr.io
registryUsername: ${{ secrets.OTELTESTAPP3_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.OTELTESTAPP3_REGISTRY_PASSWORD }}
containerAppName: oteltestapp3
resourceGroup: ca-snehapar-group
imageToBuild: snehapark4apssacr.azurecr.io/oteltestapp3:${{ github.sha }}





0 comments on commit 2d51c0e

Please sign in to comment.