Skip to content

Deployment Failed, Error: No credentials found #445

@rufer7

Description

@rufer7

For some not yet identified reason, the azure/webapps-deploy@v3 (I also tried azure/webapps-deploy@v3.0.2) fails with the following error:

Error: Deployment Failed, Error: No credentials found. Add an Azure login action before this action. For more details refer https://github.com/azure/login

My GitHub actions workflow job looks as follows:

  deploy:
    name: Deploy to Azure Web App
    runs-on: ubuntu-latest
    environment: dev
    needs: [build_test_publish, iac_apply]
    steps:
      - name: Download artifact
        uses: actions/download-artifact@v4
      - uses: azure/login@v2
        with:
          client-id: ${{ secrets.AZURE_CLIENT_ID }}
          tenant-id: ${{ secrets.AZURE_TENANT_ID }}
          subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
      - name: Deploy to Azure Web App
        uses: azure/webapps-deploy@v3.0.2
        with:
          app-name: my-app
          package: .
      - name: Logout
        run: |
          az logout

The steps Download artifact and azure/login@v2 both succeed. To set up the secrets, I followed the official docs here and the jobs before the one above succeed with the same secrets (iac_apply for example). I also enabled debug logging where I saw that az account show is executed and the next log entry was {} so I assume the account show command returns an empty object. But I have no idea why. Would be happy about any suggestions, hints or resolutions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions