Azure Developer CLI (azd): How to deploy azd sample from github with push?

Siegfried Heintze 1,906 Reputation points
2024-03-04T04:05:02.84+00:00

I'm using the sample at https://github.com/azure-samples/todo-csharp-sql .

When I do an "azd up" it works. Yahoo!

Having done a "git push" to my github repo, I see that there is a github workflow that tries to run when I "git push". However, it fails with the following error (scroll down).

I guess I need to supply an environment name via the github repo variables and secrets?

Can someone please guide me?

Thanks

Siegfried

0s
Run azd provision --no-prompt
  azd provision --no-prompt
  shell: /usr/bin/bash -e {0}
  env:
    AZURE_CLIENT_ID: 
    AZURE_TENANT_ID: 
    AZURE_SUBSCRIPTION_ID: 
    AZURE_CREDENTIALS: 
    AZURE_ENV_NAME: 
    AZURE_LOCATION: 
Error: loading environment: reading environment name: no default response for prompt 'Enter a new environment name:'
Error: Process completed with exit code 1.

Community Center | Not monitored
0 comments No comments
{count} votes

Accepted answer
  1. Victor Vazquez 80 Reputation points Microsoft Employee
    2024-03-04T21:32:48.3733333+00:00

    Run azd pipeline config

    azd will set the environment variables and configure a credential to login from your workflow to Azure.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. shoaib abbas 0 Reputation points
    2024-03-04T04:36:43.5733333+00:00

    To resolve GitHub Actions workflow issues:

    1. Check the workflow file for errors.
    2. Identify necessary environment variables.
    3. Set secrets in GitHub repository settings.
    4. Update the workflow to use secrets.
    5. Ensure proper environment name configuration.
    6. Push a new commit to trigger the updated workflow and check the GitHub Actions tab for results.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.