From c2cc54a69e8f66b42dbbc3f29898787dba75c896 Mon Sep 17 00:00:00 2001 From: Nick Fyson Date: Wed, 8 Sep 2021 10:28:14 +0100 Subject: [PATCH] only check nwo of supported actions --- script/sync-ghes/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script/sync-ghes/index.ts b/script/sync-ghes/index.ts index 95f70c0..9edc70e 100755 --- a/script/sync-ghes/index.ts +++ b/script/sync-ghes/index.ts @@ -58,7 +58,7 @@ async function checkWorkflows( const isPartnerWorkflow = workflowProperties.creator ? partnersSet.has(workflowProperties.creator.toLowerCase()) : false; const enabled = - !isPartnerWorkflow && + !isPartnerWorkflow && (await checkWorkflow(workflowFilePath, enabledActions)); const workflowDesc: WorkflowDesc = { @@ -104,7 +104,8 @@ async function checkWorkflow( if (!!step.uses) { // Check if allowed action const [actionName, _] = step.uses.split("@"); - if (!enabledActionsSet.has(actionName.toLowerCase())) { + const actionNwo = actionName.split("/").slice(0, 2).join("/"); + if (!enabledActionsSet.has(actionNwo.toLowerCase())) { console.info( `Workflow ${workflowPath} uses '${actionName}' which is not supported for GHES.` );