Skip to content

Create an auto-deploy file #5

Create an auto-deploy file

Create an auto-deploy file #5

name: Trigger auto deployment for tmtests2c-python-tmregtest
# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ master ]
paths:
- '**'
- '.github/workflows/tmtests2c-python-tmregtest-AutoDeployTrigger-d2347260-3fef-48ca-8fd4-0ca02e74a9bf.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.TMTESTS2CPYTHONTMREGTEST_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.TMTESTS2CPYTHONTMREGTEST_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.TMTESTS2CPYTHONTMREGTEST_AZURE_SUBSCRIPTION_ID }}
- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}
registryUrl: tmregtest.azurecr.io
registryUsername: ${{ secrets.TMTESTS2CPYTHONTMREGTEST_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.TMTESTS2CPYTHONTMREGTEST_REGISTRY_PASSWORD }}
containerAppName: tmtests2c-python-tmregtest
resourceGroup: tmauldin-test
imageToBuild: tmregtest.azurecr.io/tmtests2c-python-tmregtest:${{ github.sha }}