Skip to content

include dev

include dev #9

name: Deploy to CDC Azure
on:
push:
branches: [azure]
workflow_dispatch:
env:
REGISTRY: ghcr.io
CONTAINER_APP: canary-v4
IMAGE_NAME: ${{ github.repository }}
permissions:
id-token: write
contents: read
jobs:
# deploy-aca:
# strategy:
# fail-fast: true
# matrix:
# target: [ development, production ]
# uses: ./.github/workflows/called_deploy_aca.yml
# with:
# target-env: ${{ matrix.target }}
deploy-aca:
runs-on: ubuntu-latest
# needs: image-builder
strategy:
fail-fast: true
matrix:
# target: [ development, production ]
target: [ production, development ]
environment: ${{ matrix.target }}
steps:
- name: Azure login
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Deploy container
uses: azure/CLI@v2
with:
azcliversion: latest
inlineScript: |
az containerapp revision copy \
-n ${{ env.CONTAINER_APP }} \
-g ${{ vars.ACA_RESOURCE_GROUP }} \
--image ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:edge \
--revision-suffix gha-${{ github.run_id }}-${{ github.run_attempt }}
# deploy-aca_dev:
# runs-on: ubuntu-latest
# # needs: image-builder
# environment: development
# steps:
# - name: Azure login
# uses: azure/login@v2
# with:
# creds: ${{ secrets.AZURE_CREDENTIALS }}
# - name: Deploy container
# uses: azure/container-apps-deploy-action@v2
# with:
# registryUrl: ${{ env.REGISTRY }}
# imageToDeploy: ${{ env.IMAGE_NAME }}:edge
# containerAppName: canary-dev
# resourceGroup: nchs-nvss-dev-moderate-canary-rg
# containerAppEnvironment: nvss-canary-dev-internal-container-app-env
# disableTelemetry: true