Skip to content

Commit

Permalink
Create winlibs builds directory
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Feb 14, 2025
1 parent 7f7e55d commit b821c06
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Http/Controllers/WinlibsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ protected function validate(array $data): bool
protected function execute(array $data): void
{
extract($data);
(new GetArtifacts)->handle($workflow_run_id, $token);
$directory = getenv('BUILDS_DIRECTORY') . '/winlibs/' . $workflow_run_id;
if(!is_dir($directory)) {
mkdir($directory, 0755, true);
}
(new GetArtifacts)->handle($workflow_run_id, $token);
file_put_contents($directory . '/data.json', json_encode($data));
}
}

0 comments on commit b821c06

Please sign in to comment.