Skip to content

Commit 9847d65

Browse files
Add GITHUB_TOKEN
1 parent e87cb26 commit 9847d65

2 files changed

Lines changed: 6 additions & 26 deletions

File tree

.ci/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ resources:
1919

2020
variables:
2121
- group: GithubTestingFeedCreds
22+
- group: InstallDSC
2223

2324
stages:
2425
- stage: Build

.ci/test.yml

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
pool:
1212
vmImage: ${{ parameters.imageName }}
1313
displayName: ${{ parameters.displayName }}
14+
variables:
15+
- GITHUB_TOKEN: $(GITHUB_TOKEN)
1416
steps:
1517
- ${{ parameters.powershellExecutable }}: |
1618
Install-Module -Name 'Microsoft.PowerShell.SecretManagement' -force -SkipPublisherCheck -AllowClobber
@@ -96,38 +98,13 @@ jobs:
9698
condition: eq(${{ parameters.useAzAuth }}, false)
9799

98100
- pwsh: |
99-
# $version = '${{ parameters.DSCVersion }}'
100-
# $packageName = "DSC-$version"
101-
# $ext = 'tar.gz'
102-
# $executableName = 'dsc'
103-
# $executableExt = if ($IsWindows) { '.exe' } else { '' }
104-
105-
# $uri = if ($IsWindows) {
106-
# $ext = 'zip'
107-
# "https://github.com/PowerShell/DSC/releases/download/v$version/DSC-$version-x86_64-pc-windows-msvc.zip"
108-
# } elseif ($IsLinux) {
109-
# "https://github.com/PowerShell/DSC/releases/download/v$version/DSC-$version-x86_64-linux.tar.gz"
110-
# }
111-
# elseif ($IsMacOS) {
112-
# "https://github.com/PowerShell/DSC/releases/download/v$version/DSC-$version-x86_64-apple-darwin.tar.gz"
113-
114-
# }
115-
# else {
116-
# throw "Unsupported OS platform"
117-
# }
118-
119-
# $destPath = Join-Path -Path $env:AGENT_TEMPDIRECTORY -ChildPath "$packageName.$ext"
120-
121-
# Write-Verbose -Verbose "Downloading DSC v3 from $uri to $destPath"
122-
123-
# Invoke-WebRequest -Uri $uri -OutFile $destPath
124-
125101
$repo = "PowerShell/DSC"
126102
$api = "https://api.github.com/repos/$repo/releases"
127103
128104
$headers = @{
129105
"User-Agent" = "pwsh"
130106
"Accept" = "application/vnd.github+json"
107+
"Authorization" = "Bearer $env:GITHUB_TOKEN"
131108
}
132109
133110
# Get releases
@@ -194,6 +171,8 @@ jobs:
194171
Write-Host "##$vstsCommandString"
195172
196173
displayName: 'Install latest DSC v3'
174+
env:
175+
GITHUB_TOKEN: $(GITHUB_TOKEN)
197176
198177
- pwsh: |
199178
Get-ChildItem -Path env: | Out-String -width 9999 -Stream | Write-Verbose -Verbose

0 commit comments

Comments
 (0)