Skip to content

Commit

Permalink
Rollup merge of #123412 - Kobzol:ci-artifacts-in-summary, r=Mark-Simu…
Browse files Browse the repository at this point in the history
…lacrum

Output URLs of CI artifacts to GitHub summary

I often want to download CI artifacts published from our workflows (I suspect others might do the same), but it's a bit annoying to extract their links from the CI logs currently. This PR also outputs URLs to them to the GitHub Actions summaries.

r? `@Mark-Simulacrum`
  • Loading branch information
matthiaskrgr authored Apr 3, 2024
2 parents deb48aa + 508530d commit 658c8f7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/ci/scripts/upload-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,17 @@ deploy_url="s3://${DEPLOY_BUCKET}/${deploy_dir}/$(ciCommit)"

retry aws s3 cp --storage-class INTELLIGENT_TIERING \
--no-progress --recursive --acl public-read "${upload_dir}" "${deploy_url}"

access_url="https://ci-artifacts.rust-lang.org/${deploy_dir}/$(ciCommit)"

# Output URLs to the uploaded artifacts to GitHub summary (if it is available)
# to make them easily accessible.
if [ -n "${GITHUB_STEP_SUMMARY}" ]
then
echo "# CI artifacts" >> "${GITHUB_STEP_SUMMARY}"

for filename in "${upload_dir}"/*.xz; do
filename=`basename "${filename}"`
echo "- [${filename}](${access_url}/${filename})" >> "${GITHUB_STEP_SUMMARY}"
done
fi

0 comments on commit 658c8f7

Please sign in to comment.