Skip to content

Commit f7258ac

Browse files
committed
fix expired
1 parent 603fca1 commit f7258ac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

models/actions/artifact.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ func CreateArtifact(ctx context.Context, t *ActionTask, artifactName, artifactPa
7878
} else if err != nil {
7979
return nil, err
8080
}
81+
82+
artifact.ExpiredUnix = timeutil.TimeStamp(time.Now().Unix() + 3600*24*expiredDays)
83+
if err := UpdateArtifactByID(ctx, artifact.ID, artifact); err != nil {
84+
return nil, err
85+
}
86+
8187
return artifact, nil
8288
}
8389

0 commit comments

Comments
 (0)