Skip to content

Create an auto-deploy file #2

Create an auto-deploy file

Create an auto-deploy file #2

name: Trigger auto deployment for bugbash-capp-1
# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ bugbash ]
paths:
- '**'
- '.github/workflows/bugbash-capp-1-AutoDeployTrigger-c6a4b193-56a0-417b-bf12-608f044a7768.yml'
# Allow manual trigger
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
id-token: write #This is required for requesting the OIDC JWT Token
steps:
- name: Checkout to the branch
uses: actions/checkout@v2
- name: Azure Login
uses: azure/login@v1
with:
client-id: ${{ secrets.BUGBASHCAPP1_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.BUGBASHCAPP1_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.BUGBASHCAPP1_AZURE_SUBSCRIPTION_ID }}
- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}
registryUrl:
registryUsername: ${{ secrets.BUGBASHCAPP1_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.BUGBASHCAPP1_REGISTRY_PASSWORD }}
containerAppName: bugbash-capp-1
resourceGroup: bugbash
imageToBuild: default/[parameters('containerAppName')]:${{ github.sha }}