mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
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:
committed by
github-actions[bot]
parent
53139a242f
commit
6fa32c3bdc
4
.github/workflows/labels.yml
vendored
4
.github/workflows/labels.yml
vendored
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user