Skip to content

Commit

Permalink
Ignore expired artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
Wise-StenRaudmets committed Jan 23, 2024
1 parent 71fc31c commit 348a983
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -127957,7 +127957,7 @@ async function findArtifactForBranch({ octokit, branch, artifactName, }) {
_e = false;
const { data: artifacts } = _c;
for (const artifact of artifacts) {
if (((_d = artifact.workflow_run) === null || _d === void 0 ? void 0 : _d.head_branch) === branch) {
if (((_d = artifact.workflow_run) === null || _d === void 0 ? void 0 : _d.head_branch) === branch && !artifact.expired) {
return artifact;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/download-artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async function findArtifactForBranch({
let pageIndex = 0;
for await (const { data: artifacts } of artifactPageIterator) {
for (const artifact of artifacts) {
if (artifact.workflow_run?.head_branch === branch) {
if (artifact.workflow_run?.head_branch === branch && !artifact.expired) {
return artifact;
}
}
Expand Down

0 comments on commit 348a983

Please sign in to comment.