workflows/labels: skip old PRs without the right artifacts

We don't need to handle the differently named artifacts in a special
way, because they have been expired anyway. But, we must handle the case
to not cause the job to fail.

(cherry picked from commit 5343c50acd)
This commit is contained in:
Wolfgang Walther
2025-06-17 09:18:27 +02:00
committed by github-actions[bot]
parent 53139a242f
commit 6fa32c3bdc

View File

@@ -130,8 +130,10 @@ jobs:
// Instead of checking the boolean artifact.expired, we will give us a minute to
// actually download the artifact in the next step and avoid that race condition.
// Older PRs, where the workflow run was already eval.yml, but the artifact was not
// called "comparison", yet, will be skipped as well.
log('Artifact expires at', artifact?.expires_at ?? '<not found>')
if (new Date(artifact.expires_at) < new Date(new Date().getTime() + 60 * 1000)) return;
if (new Date(artifact?.expires_at ?? 0) < new Date(new Date().getTime() + 60 * 1000)) return;
await artifactClient.downloadArtifact(artifact.id, {
findBy: {