mirror of
https://github.com/yuliskov/SmartTube.git
synced 2026-04-30 09:59:23 -05:00
cleanup workflow: fix skip current workflow
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user