about summary refs log tree commit diff
path: root/src/ci/scripts
diff options
context:
space:
mode:
authorJakub Beránek <jakub.beranek@vsb.cz>2024-04-03 15:28:47 +0200
committerJakub Beránek <jakub.beranek@vsb.cz>2024-04-03 15:33:40 +0200
commit508530dbc5b6a1234b1616a077efbfd048c3a3cd (patch)
tree0c19e470880ceb1023ed2e69e1dc7330dc5d34d8 /src/ci/scripts
parent99c42d234064bede688a02d7076d369ecce1a513 (diff)
downloadrust-508530dbc5b6a1234b1616a077efbfd048c3a3cd.tar.gz
rust-508530dbc5b6a1234b1616a077efbfd048c3a3cd.zip
Output URLs of CI artifacts to GitHub summary
Diffstat (limited to 'src/ci/scripts')
-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