updated to find moved runner script
This commit is contained in:
+1
-1
@@ -54,7 +54,7 @@ def handle_event(request: GiteaRequest):
|
|||||||
# clone repository
|
# clone repository
|
||||||
local_repo_dir = clone_repository(repo_url)
|
local_repo_dir = clone_repository(repo_url)
|
||||||
# locate runner script
|
# locate runner script
|
||||||
runner_script_path = local_repo_dir / 'runner_script.yml'
|
runner_script_path = local_repo_dir / '.gitea' / 'gpu_runner' / 'script.yml'
|
||||||
if not runner_script_path.exists():
|
if not runner_script_path.exists():
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=200,
|
status_code=200,
|
||||||
|
|||||||
@@ -24,6 +24,6 @@ class RunnerScript(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
path = Path(__file__).parent.parent / 'runner_script.yml'
|
path = Path('.gitea') / 'gpu_runner' / 'script.yml'
|
||||||
rs = RunnerScript.from_file(path)
|
rs = RunnerScript.from_file(path)
|
||||||
print(rs)
|
print(rs)
|
||||||
|
|||||||
Reference in New Issue
Block a user