Skip to content

Commit 391fa16

Browse files
committed
Patched release.yml
1 parent 1415df7 commit 391fa16

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,20 @@ jobs:
4545
});
4646
4747
const matchingRuns = data.workflow_runs
48-
.filter((run) => run.ref === targetRef)
48+
.filter((run) => {
49+
if (typeof run.head_branch === 'string' && run.head_branch.length > 0) {
50+
return run.head_branch === targetTag;
51+
}
52+
53+
return run.head_sha === targetSha;
54+
})
4955
.sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime());
5056
5157
if (matchingRuns.length > 0) {
5258
const run = matchingRuns[0];
53-
core.info(`Found CI run #${run.run_number}: status=${run.status}, conclusion=${run.conclusion ?? 'n/a'}`);
59+
core.info(
60+
`Found CI run #${run.run_number}: head_branch=${run.head_branch ?? 'n/a'}, status=${run.status}, conclusion=${run.conclusion ?? 'n/a'}`
61+
);
5462
5563
if (run.status === 'completed') {
5664
if (run.conclusion === 'success') {

0 commit comments

Comments
 (0)