Skip to content

Commit a070c3e

Browse files
authored
Add cache control during releases (#3937)
When releasing bccontainerhelper we upload the new version to a storage account. When these blobs are accessed through AFD we should specify what the cache duration should be so AFD takes that into consideration.
1 parent 59828ce commit a070c3e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/CI.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ jobs:
252252
253253
Compress-Archive -path $path -DestinationPath "$($path).zip"
254254
Set-AzStorageBlobContent -File "$($path).zip" -Context $storageContext -Container 'public' -Blob "$version-$prerelease.zip" -Force | Out-Null
255-
Set-AzStorageBlobContent -File "$($path).zip" -Context $storageContext -Container 'public' -Blob "preview.zip" -Force | Out-Null
255+
Set-AzStorageBlobContent -File "$($path).zip" -Context $storageContext -Container 'public' -Blob "preview.zip" -Properties @{"CacheControl" = "no-cache"} -Force | Out-Null
256256
257257
Write-Host "Publishing Module"
258258
Publish-Module -Path $path -NuGetApiKey '${{ secrets.NugetKey }}' -SkipAutomaticTags

.github/workflows/Release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
110110
Compress-Archive -path $path -DestinationPath "$($path).zip"
111111
Set-AzStorageBlobContent -File "$($path).zip" -Context $storageContext -Container 'public' -Blob "$version.zip" -Force | Out-Null
112-
Set-AzStorageBlobContent -File "$($path).zip" -Context $storageContext -Container 'public' -Blob "latest.zip" -Force | Out-Null
112+
Set-AzStorageBlobContent -File "$($path).zip" -Context $storageContext -Container 'public' -Blob "latest.zip" -Properties @{"CacheControl" = "no-cache"} -Force | Out-Null
113113
114114
Write-Host "Publishing Module"
115115
Publish-Module -Path $path -NuGetApiKey '${{ secrets.NugetKey }}' -SkipAutomaticTags

0 commit comments

Comments
 (0)