From 25b01e06592ab87e6e64a4938b67fc218abac8e2 Mon Sep 17 00:00:00 2001 From: LucBerge Date: Wed, 24 Apr 2024 16:51:09 +0200 Subject: [PATCH] Update test.yml --- .github/workflows/test.yml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8daeab5c5..ab81686ca 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,18 +38,21 @@ jobs: console.log(process.env.DOFUS_VERSION); console.log(process.env.DATAFUS_VERSION); console.log(process.env.DOFUS_VERSION == process.env.DATAFUS_VERSION); - - const delay = ms => new Promise(res => setTimeout(res, ms)); - - github.rest.actions.cancelWorkflowRun({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: context.runId - }); + + if(process.env.DOFUS_VERSION == process.env.DATAFUS_VERSION) { + console.log("Dofus and Datafus versions are the same. Stopping the workflow.) + const delay = ms => new Promise(res => setTimeout(res, ms)); - while (true) { - core.info('Waiting for workflow to cancel ...'); - await delay(5000); + github.rest.actions.cancelWorkflowRun({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: context.runId + }); + + while (true) { + core.info('Waiting for workflow to cancel ...'); + await delay(5000); + } } - name: U1 - Update Dofus Client