File tree Expand file tree Collapse file tree 1 file changed +29
-1
lines changed
Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -461,7 +461,35 @@ jobs:
461461 name : coverage-report
462462 path : coveragereport
463463
464-
464+
465+ - name : Get artifact location
466+ run : |
467+ # Get the artifact list for the current workflow run
468+ ARTIFACT_LIST=$(gh api "repos/TechnologyEnhancedLearning/TELBlazor/actions/runs/${GITHUB_RUN_ID}/artifacts")
469+ # Echo the entire artifact list for debugging purposes
470+ echo "Artifact List: $ARTIFACT_LIST"
471+ # Extract the download URL from the artifact list (first artifact in the list)
472+ #ARTIFACT_URL=$(echo "$ARTIFACT_LIST" | jq -r '.artifacts[0].archive_download_url')
473+ ARTIFACT_URL=$(echo "$ARTIFACT_LIST" | jq -r '.artifacts[0].url')
474+ # Echo the artifact URL to confirm
475+ echo "Artifact URL: $ARTIFACT_URL"
476+ echo "artifact_url=$ARTIFACT_URL" >> $GITHUB_ENV
477+
478+ - name : Trigger workflow in TELBlazor-CodeReport repo
479+ run : |
480+ repo_owner="TechnologyEnhancedLearning"
481+ repo_name="TELBlazor-CodeReport"
482+ event_type="artifact_ready"
483+ # Trigger the workflow
484+ curl -L \
485+ -X POST \
486+ -H "Accept: application/vnd.github+json" \
487+ -H "Authorization: Bearer $PACKAGES_TOKEN" \
488+ -H "X-GitHub-Api-Version: 2022-11-28" \
489+ https://api.github.com/repos/$repo_owner/$repo_name/dispatches \
490+ -d "{\"event_type\": \"$event_type\", \"client_payload\": {\"artifact_url\": \"$artifact_url\"}}"
491+
492+
465493 reuseable-ci-checks-check-for-failed-jobs :
466494 name : Check for failures
467495 if : ${{ inputs.runall }}
You can’t perform that action at this time.
0 commit comments