Skip to content

Create an auto-deploy file #1

Create an auto-deploy file

Create an auto-deploy file #1

name: Trigger auto deployment for capp-kairos-broker
# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ feat/pipeline ]
paths:
- '**'
- '.github/workflows/capp-kairos-broker-AutoDeployTrigger-6b4c762d-d128-4f84-8963-4e5a6d306171.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
contents: read #Required when GH token is used to authenticate with private repo
steps:
- name: Checkout to the branch
uses: actions/checkout@v2
- name: Azure Login
uses: azure/login@v2
with:
client-id: ${{ secrets.CAPPKAIROSBROKER_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.CAPPKAIROSBROKER_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.CAPPKAIROSBROKER_AZURE_SUBSCRIPTION_ID }}
- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}/src/Gateway
_dockerfilePathKey_: _dockerfilePath_
_targetLabelKey_: _targetLabel_
registryUrl: kairosfinance.azurecr.io
registryUsername: ${{ secrets.CAPPKAIROSBROKER_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.CAPPKAIROSBROKER_REGISTRY_PASSWORD }}
containerAppName: capp-kairos-broker
resourceGroup: kairos
imageToBuild: kairosfinance.azurecr.io/capp-kairos-broker:${{ github.sha }}
_buildArgumentsKey_: |
_buildArgumentsValues_