From 62f6872b4ea8dd11b34ded263418d156067e6d15 Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Wed, 20 May 2020 10:00:39 -0700 Subject: [PATCH] Move ghes-sync into subfolder --- .github/workflows/sync_ghes.yaml | 2 +- .gitignore | 2 +- script/{ => sync-ghes}/exec.ts | 0 script/{ => sync-ghes}/index.ts | 5 ++++- script/{ => sync-ghes}/package-lock.json | 0 script/{ => sync-ghes}/package.json | 0 script/{ => sync-ghes}/settings.json | 0 script/{ => sync-ghes}/tsconfig.json | 0 8 files changed, 6 insertions(+), 3 deletions(-) rename script/{ => sync-ghes}/exec.ts (100%) rename script/{ => sync-ghes}/index.ts (95%) rename script/{ => sync-ghes}/package-lock.json (100%) rename script/{ => sync-ghes}/package.json (100%) rename script/{ => sync-ghes}/settings.json (100%) rename script/{ => sync-ghes}/tsconfig.json (100%) diff --git a/.github/workflows/sync_ghes.yaml b/.github/workflows/sync_ghes.yaml index 6a0be1b..0b1d289 100644 --- a/.github/workflows/sync_ghes.yaml +++ b/.github/workflows/sync_ghes.yaml @@ -19,7 +19,7 @@ jobs: run: | npm ci npx ts-node-script ./index.ts - working-directory: ./script + working-directory: ./script/sync-ghes - run: | git add -A git commit -m "Updating GHES workflows" diff --git a/.gitignore b/.gitignore index d844aa1..c5364f2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -script/node_modules \ No newline at end of file +script/**/node_modules \ No newline at end of file diff --git a/script/exec.ts b/script/sync-ghes/exec.ts similarity index 100% rename from script/exec.ts rename to script/sync-ghes/exec.ts diff --git a/script/index.ts b/script/sync-ghes/index.ts similarity index 95% rename from script/index.ts rename to script/sync-ghes/index.ts index 943ffc3..c5633c2 100755 --- a/script/index.ts +++ b/script/sync-ghes/index.ts @@ -51,7 +51,7 @@ async function checkWorkflows( } /** - * Check if a workflow only the given set of actions. + * Check if a workflow uses only the given set of actions. * * @param workflowPath Path to workflow yaml file * @param enabledActions List of enabled actions @@ -75,6 +75,9 @@ async function checkWorkflow( // Check if allowed action const [actionName, _] = step.uses.split("@"); if (!enabledActionsSet.has(actionName.toLowerCase())) { + console.info( + `Workflow ${workflowPath} uses '${actionName}' which is not supported for GHES.` + ); return false; } } diff --git a/script/package-lock.json b/script/sync-ghes/package-lock.json similarity index 100% rename from script/package-lock.json rename to script/sync-ghes/package-lock.json diff --git a/script/package.json b/script/sync-ghes/package.json similarity index 100% rename from script/package.json rename to script/sync-ghes/package.json diff --git a/script/settings.json b/script/sync-ghes/settings.json similarity index 100% rename from script/settings.json rename to script/sync-ghes/settings.json diff --git a/script/tsconfig.json b/script/sync-ghes/tsconfig.json similarity index 100% rename from script/tsconfig.json rename to script/sync-ghes/tsconfig.json