playwright/.github/actions/upload-blob-report/action.yml
Dmitry Gozman d92fe16b76
fix(blob report): default location relative to package.json (#24481)
Also:
- remove `blob-report` directory at the start;
- markdown's `report.md` next to package.json;
- use default location in playwright's workflows.

References #24451.
2023-07-28 15:49:31 -07:00

39 lines
1.4 KiB
YAML

name: 'Upload blob report'
description: 'Upload blob to Azure blob storage or to GitHub artifacts (for pull requests)'
inputs:
report_dir:
description: 'Directory containing blob report'
required: true
type: string
default: 'blob-report'
connection_string:
description: 'Azure connection string'
required: true
type: string
runs:
using: "composite"
steps:
- name: Upload blob report to Azure
if: always() && github.event_name == 'push'
shell: bash
run: |
REPORT_DIR='run-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.sha }}'
az storage blob upload-batch -s "${{ inputs.report_dir }}" -d "\$web/$REPORT_DIR" --connection-string "${{ inputs.connection_string }}"
- name: Upload blob report to GitHub
if: always() && github.event_name == 'pull_request'
uses: actions/upload-artifact@v3
with:
name: blob-report-${{ github.run_attempt }}
path: ${{ inputs.report_dir }}
retention-days: 30
- name: Write triggering pull request number in a file
if: always() && github.event_name == 'pull_request'
shell: bash
run: echo '${{ github.event.number }}' > pull_request_number.txt;
- name: Upload artifact with the pull request number
if: always() && github.event_name == 'pull_request'
uses: actions/upload-artifact@v3
with:
name: pull-request
path: pull_request_number.txt