π OpenHands: AI-Driven Development
feat(resolver): Support for User-Defined Runners (#8216)
Victor Faro59f00e641fd5
diff --git a/.github/workflows/openhands-resolver.yml b/.github/workflows/openhands-resolver.ymlindex 0b89031fcb..f34e49bc6d 100644--- a/.github/workflows/openhands-resolver.yml+++ b/.github/workflows/openhands-resolver.yml@@ -34,6 +34,10 @@ on:type: stringdefault: ""description: "Custom sandbox env"+ runner:+ required: false+ type: string+ default: "ubuntu-latest"secrets:LLM_MODEL:required: false@@ -79,7 +83,7 @@ jobs:(github.event.review.author_association == 'OWNER' || github.event.review.author_association == 'COLLABORATOR' || github.event.review.author_association == 'MEMBER')))- runs-on: ubuntu-latest+ runs-on: "${{ inputs.runner }}"steps:- name: Checkout repositoryuses: actions/checkout@v4diff --git a/docs/modules/usage/how-to/github-action.md b/docs/modules/usage/how-to/github-action.mdindex 74af7090e6..2c985eec62 100644--- a/docs/modules/usage/how-to/github-action.md+++ b/docs/modules/usage/how-to/github-action.md@@ -49,3 +49,4 @@ The customization options you can set are:| `OPENHANDS_MACRO` | Variable | Customize default macro for invoking the resolver | `OPENHANDS_MACRO=@resolveit` || `OPENHANDS_BASE_CONTAINER_IMAGE` | Variable | Custom Sandbox ([learn more](https://docs.all-hands.dev/modules/usage/how-to/custom-sandbox-guide)) | `OPENHANDS_BASE_CONTAINER_IMAGE="custom_image"` || `TARGET_BRANCH` | Variable | Merge to branch other than `main` | `TARGET_BRANCH="dev"` |+| `TARGET_RUNNER` | Variable | Target runner to execute the agent workflow (default ubuntu-latest) | `TARGET_RUNNER="custom-runner"` |diff --git a/openhands/resolver/examples/openhands-resolver.yml b/openhands/resolver/examples/openhands-resolver.ymlindex c76e197d36..e1fa13f5aa 100644--- a/openhands/resolver/examples/openhands-resolver.yml+++ b/openhands/resolver/examples/openhands-resolver.yml@@ -26,6 +26,7 @@ jobs:base_container_image: ${{ vars.OPENHANDS_BASE_CONTAINER_IMAGE || '' }}LLM_MODEL: ${{ vars.LLM_MODEL || 'anthropic/claude-3-5-sonnet-20241022' }}target_branch: ${{ vars.TARGET_BRANCH || 'main' }}+ runner: ${{ vars.TARGET_RUNNER }}secrets:PAT_TOKEN: ${{ secrets.PAT_TOKEN }}PAT_USERNAME: ${{ secrets.PAT_USERNAME }}