Skip to content

Commit 658c8f7

Browse files
authored
Rollup merge of rust-lang#123412 - Kobzol:ci-artifacts-in-summary, r=Mark-Simulacrum
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`
2 parents deb48aa + 508530d commit 658c8f7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Diff for: src/ci/scripts/upload-artifacts.sh

+14
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,17 @@ deploy_url="s3://${DEPLOY_BUCKET}/${deploy_dir}/$(ciCommit)"
4545

4646
retry aws s3 cp --storage-class INTELLIGENT_TIERING \
4747
--no-progress --recursive --acl public-read "${upload_dir}" "${deploy_url}"
48+
49+
access_url="https://ci-artifacts.rust-lang.org/${deploy_dir}/$(ciCommit)"
50+
51+
# Output URLs to the uploaded artifacts to GitHub summary (if it is available)
52+
# to make them easily accessible.
53+
if [ -n "${GITHUB_STEP_SUMMARY}" ]
54+
then
55+
echo "# CI artifacts" >> "${GITHUB_STEP_SUMMARY}"
56+
57+
for filename in "${upload_dir}"/*.xz; do
58+
filename=`basename "${filename}"`
59+
echo "- [${filename}](${access_url}/${filename})" >> "${GITHUB_STEP_SUMMARY}"
60+
done
61+
fi

0 commit comments

Comments
 (0)