cleanup workflow: fix skip current workflow

This commit is contained in:
Yuriy Liskov
2025-12-30 14:41:09 +02:00
parent 4e40e18b82
commit 947d5e02c5
+7 -1
View File
@@ -14,8 +14,9 @@ jobs:
- uses: actions/github-script@v7
with:
script: |
const KEEP = 1;
const KEEP = 0;
const workflowNames = ["VirusTotal Scan", "Cleanup old workflow runs"];
const currentWorkflowName = context.workflow;
// Get workflow ID
const workflows = await github.rest.actions.listRepoWorkflows({
@@ -30,6 +31,11 @@ jobs:
continue;
}
if (wf.name === currentWorkflowName) {
core.info(`Skipping current workflow "${wf.name}"`);
continue;
}
// List runs
const runs = await github.rest.actions.listWorkflowRuns({
owner: context.repo.owner,