diff --git a/index.js b/index.js index 942344d..9a44648 100644 --- a/index.js +++ b/index.js @@ -12,6 +12,7 @@ import axios from "axios"; startGroup("Preparing CircleCI Pipeline Trigger"); const repoOrg = context.repo.owner; const repoName = context.repo.repo; +const host = `${process.env.CCI_HOST}` || "circleci.com"; info(`Org: ${repoOrg}`); info(`Repo: ${repoName}`); const ref = context.ref; @@ -63,7 +64,7 @@ if (tag) { Object.assign(body, { branch }); } -const url = `https://circleci.com/api/v2/project/gh/${repoOrg}/${repoName}/pipeline`; +const url = `https://${host}/api/v2/project/gh/${repoOrg}/${repoName}/pipeline`; info(`Triggering CircleCI Pipeline for ${repoOrg}/${repoName}`); info(`Triggering URL: ${url}`);