OpenHands / OpenHands/benchmarks
Remove redundant 'Apply workflow_dispatch overrides' step from build workflows
@simonrosenberg is already working on this.
Since Apr 13, 2026.
- Dominant language
- Python
- Stars
- 124
- Forks
- 90
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 1
Description
Problem
Several build workflows have a redundant pattern: an env: block with hardcoded defaults, followed by an "Apply workflow_dispatch overrides" step that copies inputs.* values into GITHUB_ENV. This override step is effectively a no-op because:
- For
workflow_dispatch: inputs always have defaults that match the env block - For
pull_request_target: the step is skipped entirely (gated byif: workflow_dispatch)
The duplication is error-prone — if someone updates the input default without updating the env default (or vice versa), they silently diverge.
Fix
Replace hardcoded env defaults with ${{ inputs.X || 'default' }} expressions. For pull_request_target, inputs are empty so the || fallback applies. For workflow_dispatch, the input value is used directly. This eliminates the need for the separate override step.
This was already done for build-swtbench-images.yml in PR #555. The same cleanup should be applied to:
-
.github/workflows/build-swebench-images.yml - Any other workflows using this pattern
Example
Before:
env:
DATASET: 'princeton-nlp/SWE-bench_Verified'
# ...
steps:
- name: Apply workflow_dispatch overrides (if any)
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
if [ -n "${{ inputs.dataset }}" ]; then echo "DATASET=${{ inputs.dataset }}" >> "$GITHUB_ENV"; fi
After:
env:
DATASET: ${{ inputs.dataset || 'princeton-nlp/SWE-bench_Verified' }}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.