Skip to content

Commit b93723e

Browse files
committed
fix validation errors
1 parent 8293e99 commit b93723e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

articles/api-center/register-apis-github-actions.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ In the following steps, create a Microsoft Entra service principal to use for co
7171
> [!NOTE]
7272
> Configuring a service principal is shown for demonstration purposes. The recommended way to authenticate with Azure for GitHub Actions is with OpenID Connect, an authentication method that uses short-lived tokens. Setting up OpenID Connect with GitHub Actions is more complex but offers hardened security. See [steps](../app-service/deploy-github-actions?tabs=openid%2Caspnetcore#1-generate-deployment-credentials).
7373
74-
Create a service principal using the [az ad sp create-for-rbac](/azure/ad/sp?view=azure-cli-latest#az-ad-sp-create-for-rbac) command. The following example first uses the [az apic show](/cli/azure/az/apic#az-apic-show) command to retrieve the resource ID of the API center. The service principal is then created with the Contributor role for the API center.
74+
Create a service principal using the [az ad sp create-for-rbac](/cli/azure/ad#az-ad-sp-create-for-rbac) command. The following example first uses the [az apic show](/cli/azure/az/apic#az-apic-show) command to retrieve the resource ID of the API center. The service principal is then created with the Contributor role for the API center.
7575

7676
```bash
7777

@@ -102,7 +102,17 @@ Copy the JSON output, which should look similar to the following:
102102

103103
### Add the service principal as a GitHub secret
104104

105-
[!INCLUDE [include](~/../articles/reusable-content/github-actions/create-secrets-service-principal.md)]
105+
In [GitHub](https://github.com/), browse your repository. Select **Settings > Security > Secrets and variables > Actions > New repository secret**.
106+
107+
Paste the entire JSON output from the Azure CLI command into the secret's value field. Name the secret `AZURE_CREDENTIALS`.
108+
109+
When you configure the GitHub workflow file later, you use the secret for the input `creds` of the [Azure/login](https://github.com/marketplace/actions/azure-login). For example:
110+
111+
```yaml
112+
- uses: azure/login@v1
113+
with:
114+
creds: ${{ secrets.AZURE_CREDENTIALS }}
115+
```
106116
107117
### Add the workflow file to your GitHub repository
108118

0 commit comments

Comments
 (0)