Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to run the GitHub Actions on a fork when contributing #137

Closed
agoncal opened this issue Dec 30, 2021 · 3 comments
Closed

Document how to run the GitHub Actions on a fork when contributing #137

agoncal opened this issue Dec 30, 2021 · 3 comments
Labels
documentation Improvements or additions to documentation stale

Comments

@agoncal
Copy link
Collaborator

agoncal commented Dec 30, 2021

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Mention any other details that might be useful

When we fork the repository, workflows are not working because the Azure CLI cannot log in:

 Az CLI Login failed. Please check the credentials. For more information refer https://aka.ms/create-secrets-for-GitHub-workflows

When looking at the workflows, it looks like we need to set the AZURE_CREDENTIALS secret. But still, it does not work.

Is there any other secret that we need to add ? It would be nice to document this in the CONTRIBUTING.md file so people know how to execute the workflows on their fork .

@mnriem
Copy link
Contributor

mnriem commented Jan 3, 2022

We could indeed document it. But it is a bit tricky as the workflows require admin consent and in most organizations that is not something a regular user will be able to get. Note that we could configure the GitHub repository to run the workflows for PRs. Thoughts?

@agoncal agoncal added the documentation Improvements or additions to documentation label Jan 14, 2022
@mnriem
Copy link
Contributor

mnriem commented Feb 3, 2022

Quick recipe

  1. Azure Active Directory
  2. App registrations
  3. New registration
  4. Enter name “application name”
  5. Check “Accounts in this organizational directory only”
  6. Add a certificate or secret
  7. New client secret
  8. Enter name ‘rbac’
  9. Create
  10. API permissions
  11. Click “User Read”
  12. Remove permission
  13. Add Permission
  14. Microsoft Graph
  15. Application Permission
  16. “Application.ReadWrite.OwnedBy”
  17. Add Permission
  18. Grant admin consent for Default Directory
  19. az ad sp create-for-rbac --name “application name” --role owner --sdk-auth
  20. Copy JSON into GitHub secret AZURE_CREDENTIALS

@mnriem
Copy link
Contributor

mnriem commented Jul 24, 2022

This issue is stale because it has been open 170 days with no activity. Remove stale label or comment or this will be closed in 10 days

@mnriem mnriem added the stale label Jul 24, 2022
@mnriem mnriem closed this as completed Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation stale
Projects
None yet
Development

No branches or pull requests

2 participants