From 59f00e641fd5271524fbf5dbc9e8c6ce05af9bc8 Mon Sep 17 00:00:00 2001 From: Victor Faro Date: Tue, 6 May 2025 17:35:35 -0300 Subject: [PATCH] feat(resolver): Support for User-Defined Runners (#8216) Co-authored-by: Victor Faro Co-authored-by: Rohit Malhotra --- .github/workflows/openhands-resolver.yml | 6 +++++- docs/modules/usage/how-to/github-action.md | 1 + openhands/resolver/examples/openhands-resolver.yml | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/openhands-resolver.yml b/.github/workflows/openhands-resolver.yml index 0b89031fcb..f34e49bc6d 100644 --- a/.github/workflows/openhands-resolver.yml +++ b/.github/workflows/openhands-resolver.yml @@ -34,6 +34,10 @@ on: type: string default: "" 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 repository uses: actions/checkout@v4 diff --git a/docs/modules/usage/how-to/github-action.md b/docs/modules/usage/how-to/github-action.md index 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.yml index 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 }}