Code yaml

GitHub Actions: Update Azure Container Apps Environment Variables

visibility 17 comment 0 access_time 20 days ago language English
jobs:
  update-container-app:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      id-token: write
    steps:
      - uses: azure/login@v1
        with:
          client-id: ${{ secrets.AZURE_CLIENT_ID }}
          tenant-id: ${{ secrets.AZURE_TENANT_ID }}
          subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

      # Update environment variable
      - name: Update container app environment variables
        uses: azure/CLI@v1
        with:
          inlineScript: |
            az config set extension.use_dynamic_install=yes_without_prompt
            az containerapp update -n MyApp -g MyResourceGroup --set-env-vars "VAR1=Value1"
Loading...
info Last modified by Kontext 8 days ago copyright This page is subject to Site terms.
comment Comments
No comments yet.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

fork_right
more_vert

Code description

GitHub Actions provides action azure/container-apps-deploy-action to deploy built container into Azure Container Apps. This action's attribute environmentVariables can be used to replace the existing variables. If you only want to update some variables, we can use Azure CLI commands.


References

https://github.com/Azure/container-apps-deploy-action