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

Use System.AccessToken instead of github-distro-mixin-password #23166

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
23 changes: 6 additions & 17 deletions build/azure-pipelines/distro-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,17 @@ trigger:
pr: none

steps:
- checkout: self
persistCredentials: true

- task: NodeTool@0
inputs:
versionSpec: "16.x"

- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
inputs:
azureSubscription: "vscode-builds-subscription"
KeyVaultName: vscode
SecretsFilter: "github-distro-mixin-password"

- script: |
set -e

cat << EOF > ~/.netrc
machine github.com
login vscode
password $(github-distro-mixin-password)
EOF

git config user.email "vscode@microsoft.com"
git config user.name "VSCode"

git remote add distro "https://github.com/$VSCODE_MIXIN_REPO.git"
git remote add distro "https://$(System_AccessToken)@github.com/$VSCODE_MIXIN_REPO.git"
git fetch distro

# Push main branch into oss/main
Expand All @@ -42,3 +29,5 @@ steps:
git merge $(node -p "require('./package.json').distro")

displayName: Sync & Merge Distro
env:
System_AccessToken: $(System.AccessToken)