From 1140250ba6020261775e3533bc736c65c012acec Mon Sep 17 00:00:00 2001 From: Bojan Rajh Date: Thu, 26 Oct 2023 16:49:02 +0200 Subject: [PATCH] try branch --- .github/scripts/trigger-workflow.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/scripts/trigger-workflow.js b/.github/scripts/trigger-workflow.js index 1ff0442dd..54632ed55 100644 --- a/.github/scripts/trigger-workflow.js +++ b/.github/scripts/trigger-workflow.js @@ -6,7 +6,19 @@ const octokit = new Octokit({ async function triggerWorkflow() { try { - const response = await octokit.repos.createDispatchEvent({ + const response = await octokit.rest.actions.createWorkflowDispatch({ + owner: 'shopware', + repo: 'developer-portal', + //event_type: 'trigger-workflow', + ref: `refs/heads/DX-healthcheck`, + workflow_id: 'external-healthcheck.yml', + client_payload: { + branch: process.env.DEV_HUB_BRANCH, + repo: process.env.DEV_HUB_REPO, + sha: process.env.DEV_HUB_SHA, + }, + }); + /*const response = await octokit.repos.createDispatchEvent({ owner: 'shopware', repo: 'developer-portal', event_type: 'trigger-workflow', @@ -18,7 +30,7 @@ async function triggerWorkflow() { repo: process.env.DEV_HUB_REPO, sha: process.env.DEV_HUB_SHA,*/ }, - }); + });*/ console.log("Workflow triggered successfully:", response.data); } catch (error) {