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 tmaultestca-s2c-3
# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ master ]
paths:
- '**'
- '.github/workflows/tmaultestca-s2c-3-AutoDeployTrigger-6bd39636-7b09-4145-af23-7cb09c331498.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.TMAULTESTCAS2C3_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.TMAULTESTCAS2C3_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.TMAULTESTCAS2C3_AZURE_SUBSCRIPTION_ID }}
- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}
registryUrl: tmregtest2.azurecr.io
registryUsername: ${{ secrets.TMAULTESTCAS2C3_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.TMAULTESTCAS2C3_REGISTRY_PASSWORD }}
containerAppName: tmaultestca-s2c-3
resourceGroup: tmauldin-test
imageToBuild: tmregtest2.azurecr.io/tmaultestca-s2c-3:${{ github.sha }}