name: 'Upload blob report' description: 'Upload blob report to GitHub artifacts (for pull requests)' inputs: report_dir: description: 'Directory containing blob report' required: true default: 'test-results/blob-report' job_name: description: 'Unique job name' required: true default: '' runs: using: "composite" steps: - id: check_dir name: Warn if directory does not exist shell: bash run: | if [[ ! -d "${{ inputs.report_dir }}" ]]; then echo "Directory '${{ inputs.report_dir }}' does not exist"; echo "dir_exists=false" >> $GITHUB_OUTPUT exit 0; else echo "dir_exists=true" >> $GITHUB_OUTPUT fi - name: Integrity check if: ${{ steps.check_dir.outputs.dir_exists == 'true' }} shell: bash run: find "${{ inputs.report_dir }}" -name "*.zip" -exec unzip -t {} \; - name: Upload blob report to GitHub if: ${{ !cancelled() && github.event_name == 'pull_request' && steps.check_dir.outputs.dir_exists == 'true' }} uses: actions/upload-artifact@v4 with: name: blob-report-${{ inputs.job_name }} path: ${{ inputs.report_dir }}/** retention-days: 7 - name: Write triggering pull request number in a file if: ${{ !cancelled() && github.event_name == 'pull_request' && steps.check_dir.outputs.dir_exists == 'true' }} shell: bash run: echo '${{ github.event.number }}' > pull_request_number.txt; - name: Upload artifact with the pull request number if: ${{ !cancelled() && github.event_name == 'pull_request' && steps.check_dir.outputs.dir_exists == 'true' }} uses: actions/upload-artifact@v4 with: name: pull-request-${{ inputs.job_name }} path: pull_request_number.txt