Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 24, 2025

This PR simplifies the Azure deployment workflow by consolidating the authentication to a single, unconditional login step using Federated Credentials.

Changes Made

  • Removed conditional if: ${{ env.AZURE_CLIENT_ID != '' }} from the Federated Credentials login step
  • Removed entire "Log in with Azure (Client Credentials)" step that used if: ${{ env.AZURE_CREDENTIALS != '' }}
  • Removed unused AZURE_CREDENTIALS environment variable from the job

Before

The workflow had two conditional login steps:

- name: Log in with Azure (Federated Credentials)
  if: ${{ env.AZURE_CLIENT_ID != '' }}
  # ... federated credentials login

- name: Log in with Azure (Client Credentials)
  if: ${{ env.AZURE_CREDENTIALS != '' }}
  # ... client credentials login

After

The workflow now has a single, unconditional login step:

- 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

Benefits

  • Simplifies workflow logic and reduces complexity
  • Eliminates potential failure points from conditional logic
  • Ensures consistent authentication method across all runs
  • Follows current best practices for Azure authentication in GitHub Actions
  • Removes dependency on legacy client credentials approach

Fixes #96.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

…derated Credentials login

Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove conditional from Azure login step in deployment workflow Remove conditional from Azure login step in deployment workflow Jul 24, 2025
Copilot AI requested a review from pamelafox July 24, 2025 20:20
Copilot finished work on behalf of pamelafox July 24, 2025 20:20
@pamelafox pamelafox marked this pull request as ready for review July 25, 2025 05:32
@pamelafox pamelafox merged commit 2d2cdd3 into main Jul 25, 2025
2 checks passed
@pamelafox pamelafox deleted the copilot/fix-96 branch July 25, 2025 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove conditional from Azure login step in deployment workflow

2 participants