From 5384722df588011a5256a6447c17cf09e9996a8d Mon Sep 17 00:00:00 2001 From: peterstone2017 <12449837+YunchuWang@users.noreply.github.com> Date: Tue, 9 Jan 2024 13:10:48 -0500 Subject: [PATCH] Update perf-testing-setup.yml --- .github/workflows/perf-testing-setup.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/perf-testing-setup.yml b/.github/workflows/perf-testing-setup.yml index d966ff9f..0f0ac7f7 100644 --- a/.github/workflows/perf-testing-setup.yml +++ b/.github/workflows/perf-testing-setup.yml @@ -84,6 +84,11 @@ jobs: chmod 777 profiling_reports docker cp $container_id:/home/profiling_reports/$report_name profiling_reports ls -ltr profiling_reports + + # calculate sas report end time + current_time=$(date -u '+%Y-%m-%dT%H:%MZ') + end_time=$(date -u -d "$current_time 30 minutes" '+%Y-%m-%dT%H:%MZ' 2>/dev/null || date -u -D '%Y-%m-%dT%H:%MZ' -d "+30 minutes" '+%Y-%m-%dT%H:%MZ') + echo "end_time=$end_time" >> $GITHUB_ENV - name: Upload SVG to Azure Blob Storage uses: bacongobbler/azure-blob-storage-upload@v3.0.0 @@ -98,13 +103,11 @@ jobs: with: azcliversion: latest inlineScript: | - current_time=$(date -u '+%Y-%m-%dT%H:%MZ') - end=$(date -u -d "$current_time 30 minutes" '+%Y-%m-%dT%H:%MZ' 2>/dev/null || date -u -D '%Y-%m-%dT%H:%MZ' -d "+30 minutes" '+%Y-%m-%dT%H:%MZ') sas=$(az storage blob generate-sas \ --container-name 'profiling' \ --name $report_name \ --permissions r \ - --expiry $end \ + --expiry $end_time \ --output tsv \ --connection-string ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}) url=$(az storage blob url \