Skip to content

Commit

Permalink
Added log upload to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DCMattyG committed Aug 20, 2023
1 parent 26dd42a commit f4f8ba6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/azure-ipam-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,20 @@ jobs:
sleep 30
echo "Time: $(date +'%T')"
- name: "Upload Logs"
working-directory: "logs"
run: |
$archiveName = "ipam-" + (Get-Date -UFormat "%Y-%m-%d_%I-%M-%S_%p").tostring() + ".zip"
Compress-Archive -Pat ./* -DestinationPath /tmp/$archiveName
$storage = Get-AzStorageAccount -Name "ipamghactionlogs" -ResourceGroupName "Logging-RG"
$context = $storage.Context
@uploadDetails = @{
File = "/tmp/$archiveName"
Container = "deploy-logs"
Blob = $archiveName
Context = $context
StandardBlobTier = "Hot"
}
Set-AzStorageBlobContent @uploadDetails
- run: echo "${{ github.job }} status is ${{ job.status }}."

0 comments on commit f4f8ba6

Please sign in to comment.