about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-04-03 17:15:50 +0200
committerGitHub <noreply@github.com>2024-04-03 17:15:50 +0200
commit658c8f73677696ff2f37ea1cbd5d667d2562ccbf (patch)
treec39cc52942d7e2c3871c4fbd22dbba1356176583 /src
parentdeb48aa0f528a1e0b3d73c0ca21122d8c018c0ad (diff)
parent508530dbc5b6a1234b1616a077efbfd048c3a3cd (diff)
downloadrust-658c8f73677696ff2f37ea1cbd5d667d2562ccbf.tar.gz
rust-658c8f73677696ff2f37ea1cbd5d667d2562ccbf.zip
Rollup merge of #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`
Diffstat (limited to 'src')
-rwxr-xr-xsrc/ci/scripts/upload-artifacts.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ci/scripts/upload-artifacts.sh b/src/ci/scripts/upload-artifacts.sh
index 9755edb6dce..c9c85ec20b4 100755
--- a/src/ci/scripts/upload-artifacts.sh
+++ b/src/ci/scripts/upload-artifacts.sh
@@ -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