update revision suffix #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ] | |
environment: ${{ matrix.target }} | |
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: ${{ env.CONTAINER_APP }} | |
resourceGroup: ${{ vars.ACA_RESOURCE_GROUP }} | |
containerAppEnvironment: ${{ vars.ACA_APP_ENVIRONMENT }} | |
disableTelemetry: true | |
- name: Update revision | |
uses: azure/CLI@v2 | |
with: | |
azcliversion: latest | |
inlineScript: | | |
az containerapp update \ | |
--name ${{ env.CONTAINER_APP }} \ | |
--resource-group ${{ vars.ACA_RESOURCE_GROUP }} \ | |
--revision-suffix gha-${{ github.run_id }}-${{ github.run_attempt }} | |
# - name: Copy revision | |
# uses: azure/CLI@v2 | |
# with: | |
# azcliversion: latest | |
# inlineScript: | | |
# az containerapp revision copy \ | |
# --name ${{ env.CONTAINER_APP }} \ | |
# --resource-group ${{ vars.ACA_RESOURCE_GROUP }} \ | |
# --revision-suffix gha-${{ github.run_id }}-${{ github.run_attempt }} | |
# --image ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:edge \ | |
## --image ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:edge \ | |
# --image ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:edge \ | |
# - name: Copy container revision | |
# 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 |