* Fix report downloading from Azure (reports are now zipped) * Extracted upload logic into an action * Extracted PR number file generation into its own job
30 lines
1.1 KiB
YAML
30 lines
1.1 KiB
YAML
name: 'Download blob report from Azure'
|
|
description: 'Download blob report from Azure blob storage'
|
|
inputs:
|
|
blob_prefix:
|
|
description: 'Name of the Azure blob storage directory containing blob report'
|
|
required: true
|
|
type: string
|
|
output_dir:
|
|
description: 'Output directory where downloaded blobs will be stored'
|
|
required: true
|
|
type: string
|
|
default: 'blob-report'
|
|
connection_string:
|
|
description: 'Azure connection string'
|
|
required: true
|
|
type: string
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Download Blob Reports from Azure Blob Storage
|
|
shell: bash
|
|
run: |
|
|
OUTPUT_DIR='${{ inputs.output_dir }}'
|
|
mkdir -p $OUTPUT_DIR
|
|
LIST=$(az storage blob list -c '$web' --prefix ${{ inputs.blob_prefix }} --connection-string "${{ inputs.connection_string }}")
|
|
for name in $(echo $LIST | jq --raw-output '.[].name | select(test("report-.*\\.zip$"))');
|
|
do
|
|
az storage blob download -c '$web' --name $name -f $OUTPUT_DIR/$(basename $name) --connection-string "${{ inputs.connection_string }}"
|
|
done
|