Skip to content

Commit 1922f22

Browse files
authored
feat: expose cloud and host in reusable workflows (#34)
* feat: expose cloud and host in reusable workflows * docs: document cloud mode usage
1 parent 9b98ba4 commit 1922f22

14 files changed

Lines changed: 123 additions & 2 deletions

.github/workflows/auto-fix-issue.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ on:
3333
required: false
3434
type: string
3535
default: ''
36+
cloud:
37+
description: Run the agent as a cloud agent using `oz agent run-cloud`.
38+
required: false
39+
type: boolean
40+
default: false
41+
host:
42+
description: Optional host to route the agent run to when cloud mode is enabled.
43+
required: false
44+
type: string
45+
default: ''
3646
secrets:
3747
WARP_API_KEY:
3848
description: Oz API key used by the Oz Agent.
@@ -110,6 +120,8 @@ jobs:
110120
name: ${{ inputs.name || vars.WARP_AGENT_NAME || '' }}
111121
mcp: ${{ inputs.mcp || vars.WARP_AGENT_MCP || '' }}
112122
skill: ${{ inputs.skill || '' }}
123+
cloud: ${{ inputs.cloud }}
124+
host: ${{ inputs.host }}
113125
- name: Create PR and Comment
114126
env:
115127
GH_TOKEN: ${{ github.token }}

.github/workflows/daily-issue-summary.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ on:
3333
required: false
3434
type: string
3535
default: ''
36+
cloud:
37+
description: Run the agent as a cloud agent using `oz agent run-cloud`.
38+
required: false
39+
type: boolean
40+
default: false
41+
host:
42+
description: Optional host to route the agent run to when cloud mode is enabled.
43+
required: false
44+
type: string
45+
default: ''
3646
secrets:
3747
WARP_API_KEY:
3848
description: Oz API key used by the Oz Agent.
@@ -135,6 +145,8 @@ jobs:
135145
name: ${{ inputs.name || vars.WARP_AGENT_NAME || '' }}
136146
mcp: ${{ inputs.mcp || vars.WARP_AGENT_MCP || '' }}
137147
skill: ${{ inputs.skill || '' }}
148+
cloud: ${{ inputs.cloud }}
149+
host: ${{ inputs.host }}
138150
- name: Post to Slack
139151
if: steps.fetch_issues.outputs.has_issues == 'true'
140152
env:

.github/workflows/fix-failing-checks.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ on:
3333
required: false
3434
type: string
3535
default: ''
36+
cloud:
37+
description: Run the agent as a cloud agent using `oz agent run-cloud`.
38+
required: false
39+
type: boolean
40+
default: false
41+
host:
42+
description: Optional host to route the agent run to when cloud mode is enabled.
43+
required: false
44+
type: string
45+
default: ''
3646
secrets:
3747
WARP_API_KEY:
3848
description: Oz API key used by the Oz Agent.
@@ -148,6 +158,8 @@ jobs:
148158
name: ${{ inputs.name || vars.WARP_AGENT_NAME || '' }}
149159
mcp: ${{ inputs.mcp || vars.WARP_AGENT_MCP || '' }}
150160
skill: ${{ inputs.skill || '' }}
161+
cloud: ${{ inputs.cloud }}
162+
host: ${{ inputs.host }}
151163
- name: Create Fix PR
152164
env:
153165
GH_TOKEN: ${{ github.token }}

.github/workflows/respond-to-comment.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ on:
3333
required: false
3434
type: string
3535
default: ''
36+
cloud:
37+
description: Run the agent as a cloud agent using `oz agent run-cloud`.
38+
required: false
39+
type: boolean
40+
default: false
41+
host:
42+
description: Optional host to route the agent run to when cloud mode is enabled.
43+
required: false
44+
type: string
45+
default: ''
3646
secrets:
3747
WARP_API_KEY:
3848
description: Oz API key used by the Oz Agent.
@@ -176,6 +186,8 @@ jobs:
176186
name: ${{ inputs.name || vars.WARP_AGENT_NAME || '' }}
177187
mcp: ${{ inputs.mcp || vars.WARP_AGENT_MCP || '' }}
178188
skill: ${{ inputs.skill || '' }}
189+
cloud: ${{ inputs.cloud }}
190+
host: ${{ inputs.host }}
179191
- name: Commit and Push Changes
180192
if: success()
181193
env:

.github/workflows/review-pr.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ on:
3333
required: false
3434
type: string
3535
default: ''
36+
cloud:
37+
description: Run the agent as a cloud agent using `oz agent run-cloud`.
38+
required: false
39+
type: boolean
40+
default: false
41+
host:
42+
description: Optional host to route the agent run to when cloud mode is enabled.
43+
required: false
44+
type: string
45+
default: ''
3646
secrets:
3747
WARP_API_KEY:
3848
description: Oz API key used by the Oz Agent.
@@ -231,6 +241,8 @@ jobs:
231241
model: ${{ inputs.model || vars.WARP_AGENT_MODEL || '' }}
232242
name: ${{ inputs.name || vars.WARP_AGENT_NAME || '' }}
233243
mcp: ${{ inputs.mcp || vars.WARP_AGENT_MCP || '' }}
244+
cloud: ${{ inputs.cloud }}
245+
host: ${{ inputs.host }}
234246
- name: Post Review
235247
uses: actions/github-script@v7
236248
if: always()

.github/workflows/suggest-review-fixes.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ on:
3333
required: false
3434
type: string
3535
default: ''
36+
cloud:
37+
description: Run the agent as a cloud agent using `oz agent run-cloud`.
38+
required: false
39+
type: boolean
40+
default: false
41+
host:
42+
description: Optional host to route the agent run to when cloud mode is enabled.
43+
required: false
44+
type: string
45+
default: ''
3646
secrets:
3747
WARP_API_KEY:
3848
description: Oz API key used by the Oz Agent.
@@ -132,6 +142,8 @@ jobs:
132142
name: ${{ inputs.name || vars.WARP_AGENT_NAME || '' }}
133143
mcp: ${{ inputs.mcp || vars.WARP_AGENT_MCP || '' }}
134144
skill: ${{ inputs.skill || '' }}
145+
cloud: ${{ inputs.cloud }}
146+
host: ${{ inputs.host }}
135147
- name: Validate responses.json
136148
run: |
137149
if [ -f responses.json ]; then

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,23 @@ Then, add a step to your workflow that runs Oz:
3232
warp_api_key: ${{ secrets.WARP_API_KEY }}
3333
```
3434
35+
## Running in cloud mode
36+
37+
By default, the action runs the agent on the GitHub Actions runner using `oz agent run`. Set
38+
`cloud: true` to start an Oz cloud agent using `oz agent run-cloud`:
39+
40+
```yaml
41+
- name: Run Oz in cloud mode
42+
uses: warpdotdev/oz-agent-action@v1
43+
with:
44+
prompt: Review the code changes on this branch
45+
cloud: true
46+
warp_api_key: ${{ secrets.WARP_API_KEY }}
47+
```
48+
49+
Cloud runs use Warp-hosted workers by default. Set `host` only when routing a cloud run to a
50+
self-hosted worker.
51+
3552
## Using Skills
3653

3754
Skills provide reusable, specialized capabilities for the Oz Agent. You can find a curated set of

consumer-workflows/auto-fix-issue.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,7 @@ jobs:
3636
name: ''
3737
mcp: ''
3838
skill: ''
39+
cloud: false
40+
host: ''
3941
secrets:
4042
WARP_API_KEY: ${{ secrets.WARP_API_KEY }}

consumer-workflows/daily-issue-summary.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535
name: ''
3636
mcp: ''
3737
skill: ''
38+
cloud: false
39+
host: ''
3840
secrets:
3941
WARP_API_KEY: ${{ secrets.WARP_API_KEY }}
4042
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

consumer-workflows/fix-failing-checks.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,7 @@ jobs:
3737
name: ''
3838
mcp: ''
3939
skill: ''
40+
cloud: false
41+
host: ''
4042
secrets:
4143
WARP_API_KEY: ${{ secrets.WARP_API_KEY }}

0 commit comments

Comments
 (0)