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

Improvement: Update Permissions of generated workflows to support Private Repos #7691

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions server/src/workflows/2022-10-01/WorkflowService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ export class WorkflowService20221001 {
tenant-id: \${{ secrets.__tenantidsecretname__ }}
subscription-id: \${{ secrets.__subscriptionidsecretname__ }}\n`;
const permssions = `permissions:
id-token: write #This is required for requesting the JWT\n`;
id-token: write #This is required for requesting the JWT\n
contents: read #Required to enable use with Private Repositories\n`;

const environment = `environment:
name: '__slotname__'
url: \${{ steps.deploy-to-webapp.outputs.webapp-url }}`;

workflowFile = workflowFile.replace(new RegExp(publishProfilePlaceholder, 'gi'), '');
workflowFile = workflowFile.replace(new RegExp(loginToAzureStepPlaceholder, 'gi'), loginToAzureStep);
workflowFile = workflowFile.replace(new RegExp(permissionsPlaceholder, 'gi'), permssions);
Expand Down