Skip to content

Commit ca8f6bd

Browse files
committed
build: an action/upload-artifact bug was fixed
1 parent 8648156 commit ca8f6bd

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

ci/download_gha_artifacts.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,12 @@ def main(owner_repo, artifact_pattern, dest_dir):
9595
temp_zip = "artifacts.zip"
9696

9797
# Download the latest of each name.
98-
# I'd like to use created_at, because it seems like the better value to use,
99-
# but it is in the wrong time zone, and updated_at is the same but correct.
100-
# Bug report here: https://github.com/actions/upload-artifact/issues/488.
10198
for name, artifacts in artifacts_by_name.items():
102-
artifact = max(artifacts, key=operator.itemgetter("updated_at"))
99+
artifact = max(artifacts, key=operator.itemgetter("created_at"))
103100
print(
104101
f"Downloading {artifact['name']}, "
105102
+ f"size: {artifact['size_in_bytes']}, "
106-
+ f"created: {utc2local(artifact['updated_at'])}"
103+
+ f"created: {utc2local(artifact['created_at'])}"
107104
)
108105
download_url(artifact["archive_download_url"], temp_zip)
109106
unpack_zipfile(temp_zip)

0 commit comments

Comments
 (0)