Merge pull request #1081 from actions/nickfyson/add-codeql-to-ghes

Nickfyson/add codeql to ghes
This commit is contained in:
Nick Fyson
2021-09-08 11:05:03 +01:00
committed by GitHub
2 changed files with 8 additions and 5 deletions
+4 -3
View File
@@ -45,7 +45,7 @@ async function checkWorkflows(
});
for (const e of dir) {
if (e.isFile()) {
if (e.isFile() && extname(e.name) === ".yml") {
const workflowFilePath = join(folder, e.name);
const workflowId = basename(e.name, extname(e.name));
const workflowProperties: WorkflowProperties = require(join(
@@ -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.`
);
+4 -2
View File
@@ -2,7 +2,8 @@
"folders": [
"../../ci",
"../../automation",
"../../deployments"
"../../deployments",
"../../code-scanning"
],
"enabledActions": [
"actions/checkout",
@@ -16,7 +17,8 @@
"actions/stale",
"actions/starter-workflows",
"actions/upload-artifact",
"actions/upload-release-asset"
"actions/upload-release-asset",
"github/codeql-action"
],
"partners": [
"Alibaba Cloud",