Skip to content

Commit 8772b77

Browse files
committed
feat: add compute gateway step
1 parent 0fb92d6 commit 8772b77

5 files changed

Lines changed: 1371 additions & 0 deletions

File tree

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,38 @@ Checks or polls the status of a GitHub Actions workflow run.
8383
timeout: "30m"
8484
```
8585

86+
### Step: `step.gh_compute_gateway`
87+
88+
Submits a GitHub-origin workload to workflow-compute's protected gateway. The
89+
compute server remains in the execution path; raw agents are not registered as
90+
GitHub runners. When `write_check` is enabled, the check target must match the
91+
repository and SHA verified by the compute server.
92+
93+
```yaml
94+
- type: step.gh_compute_gateway
95+
config:
96+
server_url: "${COMPUTE_SERVER_URL}"
97+
token: "${COMPUTE_GITHUB_TOKEN}"
98+
repository: "GoCodeAlone/workflow-compute"
99+
oidc_token: "{{.github_oidc_token}}"
100+
workflow_run_id: "{{.run_id}}"
101+
workflow_job_id: "{{.job_id}}"
102+
workflow_job_name: "build"
103+
ref: "{{.ref}}"
104+
sha: "{{.sha}}"
105+
org_id: "org-1"
106+
pool_id: "pool-1"
107+
policy_id: "policy-1"
108+
command_args: ["go", "test", "./..."]
109+
wait: true
110+
write_check: true
111+
check_owner: "GoCodeAlone"
112+
check_repo: "workflow-compute"
113+
check_sha: "{{.sha}}"
114+
check_name: "workflow-compute"
115+
check_token: "${GITHUB_TOKEN}"
116+
```
117+
86118
### Step: `step.gh_create_check`
87119

88120
Creates a GitHub Check Run (commit status check).

internal/plugin.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ func (p *githubPlugin) StepTypes() []string {
7171
// Existing steps
7272
"step.gh_action_trigger",
7373
"step.gh_action_status",
74+
"step.gh_compute_gateway",
7475
"step.gh_create_check",
7576
// Pull request steps
7677
"step.gh_pr_create",
@@ -100,6 +101,8 @@ func (p *githubPlugin) CreateStep(typeName, name string, config map[string]any)
100101
return newActionTriggerStep(name, config, nil)
101102
case "step.gh_action_status":
102103
return newActionStatusStep(name, config, nil)
104+
case "step.gh_compute_gateway":
105+
return newComputeGatewayStep(name, config, nil)
103106
case "step.gh_create_check":
104107
return newCreateCheckStep(name, config, nil)
105108
case "step.gh_pr_create":

0 commit comments

Comments
 (0)