Skip to content

Remove conditional from Azure login step in deployment workflow #262

@pamelafox

Description

@pamelafox

Issue Description

The azd deployment workflow file contains a conditional Azure login step that should be simplified.

Current Problem

The workflow currently has a conditional login step using:

if: ${{ env.AZURE_CLIENT_ID != '' }}

Recommended Fix

Modify the azd deployment workflow file so that the login step does not have a conditional. There should only be a single login step that looks like:

- name: Log in with Azure (Federated Credentials)
  run: |
    azd auth login `
      --client-id "$Env:AZURE_CLIENT_ID" `
      --federated-credential-provider "github" `
      --tenant-id "$Env:AZURE_TENANT_ID"
  shell: pwsh

Remove any additional login step that uses "Client Credentials".

Benefits

  • Simplifies the workflow logic
  • Reduces complexity and potential failure points
  • Ensures consistent authentication method
  • Follows current best practices for Azure authentication in GitHub Actions

Please review and update the affected workflow files to remove the conditional and consolidate to a single login step using Federated Credentials.

Details

Pattern: if: \$\{\{ env\.AZURE_CLIENT_ID != '' \}\}

File: .github/workflows/azure-dev.yml

Found matches:

Line 46:

if: ${{ env.AZURE_CLIENT_ID != '' }}

Repository: https://github.com/Azure-Samples/contoso-chat


This issue was automatically created by the GitHub Repo Maintainer Agent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions