Skip to content
This repository was archived by the owner on Dec 10, 2024. It is now read-only.

Commit 25b01e0

Browse files
authored
Update test.yml
1 parent 30fc419 commit 25b01e0

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

.github/workflows/test.yml

+14-11
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,21 @@ jobs:
3838
console.log(process.env.DOFUS_VERSION);
3939
console.log(process.env.DATAFUS_VERSION);
4040
console.log(process.env.DOFUS_VERSION == process.env.DATAFUS_VERSION);
41-
42-
const delay = ms => new Promise(res => setTimeout(res, ms));
43-
44-
github.rest.actions.cancelWorkflowRun({
45-
owner: context.repo.owner,
46-
repo: context.repo.repo,
47-
run_id: context.runId
48-
});
41+
42+
if(process.env.DOFUS_VERSION == process.env.DATAFUS_VERSION) {
43+
console.log("Dofus and Datafus versions are the same. Stopping the workflow.)
44+
const delay = ms => new Promise(res => setTimeout(res, ms));
4945
50-
while (true) {
51-
core.info('Waiting for workflow to cancel ...');
52-
await delay(5000);
46+
github.rest.actions.cancelWorkflowRun({
47+
owner: context.repo.owner,
48+
repo: context.repo.repo,
49+
run_id: context.runId
50+
});
51+
52+
while (true) {
53+
core.info('Waiting for workflow to cancel ...');
54+
await delay(5000);
55+
}
5356
}
5457
5558
- name: U1 - Update Dofus Client

0 commit comments

Comments
 (0)