File tree 1 file changed +13
-10
lines changed 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,17 @@ jobs:
20
20
- checkout : self
21
21
submodules : true
22
22
presteps :
23
- - task : DownloadSecureFile@1
24
- displayName : Download THNETII.Octokit.Test AuthSecrets
23
+ - task : thnetii.azuredevops-githubtasklibrary.githubaccesstokentask.githubaccesstokentask@0
24
+ displayName : ' Get GitHub Access Token '
25
25
inputs :
26
- secureFile : AuthSecrets.json
27
- - task : CopyFiles@2
28
- displayName : Copy THNETII.Octokit.Test AuthSecrets to test directory
29
- inputs :
30
- sourceFolder : $(Agent.TempDirectory)
31
- contents : AuthSecrets.json
32
- targetFolder : $(Build.SourcesDirectory)/test/THNETII.Octokit.Test/Authentication.Test/
33
- overWrite : true
26
+ gitHubConnection : thnetii
27
+ - pwsh : |
28
+ $targetPath = Join-Path $ENV:Build_SourcesDirectory "test/THNETII.Octokit.Test/Authentication.Test/AuthSecrets.json"
29
+ $instance = @{
30
+ Credentials = @{
31
+ Token = $ENV:GitHubAccessToken;
32
+ AuthenticationType = "Bearer";
33
+ };
34
+ } | ConvertTo-Json | Set-Content -Path $targetPath
35
+ env:
36
+ GitHubAccessToken: $(GitHub.AccessToken)
You can’t perform that action at this time.
0 commit comments