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

Restore github auth for releases #20430

Merged
merged 5 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions ci/build-all-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ steps:
displayName: npm install min agent demands

- script: node ./ci/verifyMinAgentDemands/index.js
# uncommnet this line once we will decide to return tocken to checks
# env:
# GITHUB_PAT: variables['GitHubPAT']
displayName: Verify min agent demands

# Filter out unchanged tasks
Expand Down Expand Up @@ -169,12 +172,12 @@ steps:
# Pull commits from remote and push branch to git
git checkout -b $releaseBranch
Write-Host 'Trying to pull the remote branch..'
git pull https://github.com/microsoft/azure-pipelines-tasks $releaseBranch
git pull https://$(GitHubPAT)@github.com/microsoft/azure-pipelines-tasks $releaseBranch
if (-not $?) {
Write-Host 'Failed to pull the remote branch. This is expected if the remote branch doesn't exist.
}
Write-Host 'Trying to push to the remote branch..'
git push https://github.com/microsoft/azure-pipelines-tasks $releaseBranch
git push https://$(GitHubPAT)@github.com/microsoft/azure-pipelines-tasks $releaseBranch
condition: |
and(
succeeded(),
Expand Down
2 changes: 1 addition & 1 deletion ci/verifyMinAgentDemands/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const fs = require('fs');
const path = require('path');
const semver = require('semver');
const tl = require('azure-pipelines-task-lib/task');
const { pat } = require('minimist')(process.argv.slice(2));
const pat = process.env.GITHUB_PAT;

const fileToJson = (...filePath) => {
const file = path.join(...filePath);
Expand Down
Loading