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 output_dir: description: 'Output directory where downloaded blobs will be stored' required: true default: 'blob-report' connection_string: description: 'Azure connection string' required: true 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