Skip to content

Commit

Permalink
USe outputs to pass canonical blob URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexAxthelm committed Oct 9, 2024
1 parent 0a65a79 commit b10fd49
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/build-push-private.yml
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,6 @@ jobs:
source: ${{ env.TEST_DIR_PARENT }}
destination: https://pactadatadev.blob.core.windows.net/ghactions-workflow-transition-monitor-results-full
overwrite: false
log_level: debug

- name: Upload report to Blob store
id: upload-report
Expand All @@ -474,31 +473,34 @@ jobs:
source: ${{ env.TEST_DIR_PARENT }}/${{ matrix.language }}/${{ matrix.peer_group }}/${{ github.run_attempt }}/working_dir/50_Outputs
destination: https://pactadatadev.blob.core.windows.net/ghactions-workflow-transition-monitor-results-reports
overwrite: false
log_level: debug

- name: Export Outputs
id: export-outputs
env:
REPORTS_DESTINATION_URL: ${{ needs.read-config.outputs.reports-destination-url }}
REPORT_UPLOADED_FILES: ${{ needs.upload-report.outputs.destination-files }}
image_name: ${{ inputs.image-name }}
test_dir: ${{ env.TEST_DIR }}
run: |
BLOB_DIR="$REPORTS_DESTINATION_URL/$test_dir/working_dir/50_Outputs/$image_name"
echo "blob-dir=$BLOB_DIR"
echo "blob-dir=$BLOB_DIR" >> "$GITHUB_OUTPUT"
echo "blob-dir=$BLOB_DIR" >> "$GITHUB_ENV"
REPORT_URL="$BLOB_DIR/report/index.html"
REPORT_URL="$(
echo "$REPORT_UPLOADED_FILES" | jq -rc '. [] | match(".*index.html$") | .string'
)"
echo "report-url=$REPORT_URL"
echo "report-url=$REPORT_URL" >> "$GITHUB_OUTPUT"
echo "report-url=$REPORT_URL" >> "$GITHUB_ENV"
SUMMARY_PATH="${test_dir}/working_dir/50_Outputs/$image_name/executive_summary/template.pdf"
if [ -f "$SUMMARY_PATH" ]; then
SUMMARY_URL="$BLOB_DIR/executive_summary/template.pdf"
SUMMARY_URL="$(
echo "$REPORT_UPLOADED_FILES" | jq -rc '. [] | match(".*template.pdf$") | .string'
)"
echo "summary-url=$SUMMARY_URL"
echo "summary-url=$SUMMARY_URL" >> "$GITHUB_OUTPUT"
echo "summary-url=$SUMMARY_URL" >> "$GITHUB_ENV"
fi
- name: Prepare comment artifact
Expand Down

0 comments on commit b10fd49

Please sign in to comment.