@@ -98,13 +98,14 @@ def main():
98
98
with open (storage / 'workflow_link.txt' , 'w' ) as file :
99
99
file .write (workflow_link )
100
100
101
- latest_artifacts_for_branch = artifact_utils .get_latest_artifacts_link (storage_dir , args .storage_root ,
102
- args .branch_name , args .event_name )
103
- # Overwrite path to "latest" built artifacts only if a given commit is the head of a given branch
104
- if args .event_name != 'pull_request' and args .commit_sha == os .getenv ('GITHUB_SHA' ):
105
- # TODO: lock to avoid corruption in case of a parallel build (unlikely event for now, but still)
106
- with open (latest_artifacts_for_branch , 'w' ) as file :
107
- file .write (str (storage .relative_to (storage_root )))
101
+ if not error_found :
102
+ latest_artifacts_for_branch = artifact_utils .get_latest_artifacts_link (storage_dir , args .storage_root ,
103
+ args .branch_name , args .event_name )
104
+ # Overwrite path to "latest" built artifacts only if a given commit is the head of a given branch
105
+ if args .event_name != 'pull_request' and args .commit_sha == os .getenv ('GITHUB_SHA' ):
106
+ # TODO: lock to avoid corruption in case of a parallel build (unlikely event for now, but still)
107
+ with open (latest_artifacts_for_branch , 'w' ) as file :
108
+ file .write (str (storage .relative_to (storage_root )))
108
109
109
110
logger .debug (f"Copying finished" )
110
111
(storage / 'copying_finished' ).touch ()
0 commit comments