Debian Codegraph @

.github/actions/download-blob-report-from-azure/action.yml

raw
1 name: 'Download blob report from Azure'
2 description: 'Download blob report from Azure blob storage'
3 inputs:
4 blob_prefix:
5 description: 'Name of the Azure blob storage directory containing blob report'
6 required: true
7 type: string
8 output_dir:
9 description: 'Output directory where downloaded blobs will be stored'
10 required: true
11 type: string
12 default: 'blob-report'
13 connection_string:
14 description: 'Azure connection string'
15 required: true
16 type: string
17 runs:
18 using: "composite"
19 steps:
20 - name: Download Blob Reports from Azure Blob Storage
21 shell: bash
22 run: |
23 OUTPUT_DIR='${{ inputs.output_dir }}'
24 mkdir -p $OUTPUT_DIR
25 LIST=$(az storage blob list -c '$web' --prefix ${{ inputs.blob_prefix }} --connection-string "${{ inputs.connection_string }}")
26 for name in $(echo $LIST | jq --raw-output '.[].name | select(test("report-.*\\.zip$"))');
27 do
28 az storage blob download -c '$web' --name $name -f $OUTPUT_DIR/$(basename $name) --connection-string "${{ inputs.connection_string }}"
29 done