syntax = "proto3"; package astro_run; import "google/protobuf/timestamp.proto"; import "google/protobuf/empty.proto"; message EnvironmentVariable { oneof value { string string = 1; float number = 2; bool boolean = 3; } } message Command { string id = 1; optional string name = 2; optional Container container = 3; string run = 4; bool continue_on_error = 5; map environments = 6; repeated string secrets = 7; uint64 timeout = 8; } message Job { string id = 1; optional string name = 2; repeated Command steps = 3; repeated string depends_on = 4; repeated string working_directories = 5; } message WorkflowEvent { string event = 1; string repo_owner = 2; string repo_name = 3; optional uint64 pr_number = 4; string sha = 5; string ref_name = 6; string branch = 7; } message Workflow { string id = 1; optional string name = 2; map jobs = 3; optional string payload = 4; } enum WorkflowState { Pending = 0; Queued = 1; InProgress = 2; Succeeded = 3; Failed = 4; Cancelled = 5; Skipped = 6; } message StepRunResult { string id = 1; WorkflowState state = 2; optional int32 exit_code = 3; optional google.protobuf.Timestamp started_at = 4; optional google.protobuf.Timestamp completed_at = 5; } message JobRunResult { string id = 1; WorkflowState state = 2; optional google.protobuf.Timestamp started_at = 3; optional google.protobuf.Timestamp completed_at = 4; repeated StepRunResult steps = 5; } message WorkflowRunResult { string id = 1; WorkflowState state = 2; optional google.protobuf.Timestamp started_at = 3; optional google.protobuf.Timestamp completed_at = 4; map jobs = 5; } message WorkflowLog { string step_id = 1; string log_type = 2; string message = 3; optional google.protobuf.Timestamp time = 4; } message WorkflowStateEvent { string type = 1; string id = 2; WorkflowState state = 3; } message Container { string name = 1; repeated string volumes = 2; repeated string security_opts = 3; } message Signal { string id = 1; string action = 2; } message Context { string id = 1; Command command = 2; WorkflowEvent event = 3; } message RunResult { oneof result { google.protobuf.Empty succeeded = 2; int32 failed = 3; google.protobuf.Empty cancelled = 4; } } message RunnerMetadata { string id = 1; string os = 2; string arch = 3; string version = 4; int32 max_runs = 5; bool support_docker = 6; bool support_host = 7; } message RunWorkflowEvent { Workflow payload = 1; optional WorkflowEvent workflow_event = 2; } message RunJobEvent { Job payload = 1; optional WorkflowEvent workflow_event = 2; } message RunStepEvent { Command payload = 1; optional WorkflowEvent workflow_event = 2; }