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 research-data-api-builder-dab
# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ main ]
paths:
- 'src/SingleWebApplication.DataAPIBuilder/**'
- '.github/workflows/research-data-api-builder-dab-AutoDeployTrigger-eb86dec0-9f7b-46d9-9845-8da47857865a.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.RESEARCHDATAAPIBUILDERDAB_AZURE_CREDENTIALS }}
- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}/src/SingleWebApplication.DataAPIBuilder
registryUrl: defaultwrutkowski.azurecr.io
registryUsername: ${{ secrets.RESEARCHDATAAPIBUILDERDAB_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.RESEARCHDATAAPIBUILDERDAB_REGISTRY_PASSWORD }}
containerAppName: research-data-api-builder-dab
resourceGroup: research-data-api-builder
imageToBuild: defaultwrutkowski.azurecr.io/research-data-api-builder-dab:${{ github.sha }}