generated from mathias/template-go-web
ci: move template expressions out of run: shells (signals#47)
CD / Lint / Test / Vet (push) Successful in 5s
CD / Lint / Test / Vet (push) Successful in 5s
autoresearch.yml expanded the rq_id, fixture, iters and model workflow_dispatch inputs (and the rq_id step output derived from them) directly into run: shells. They now arrive via env:; loop.py arguments are built as a bash array so a value with spaces stays one argument. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -31,13 +31,21 @@ jobs:
|
|||||||
|
|
||||||
- name: Resolve run ID
|
- name: Resolve run ID
|
||||||
id: vars
|
id: vars
|
||||||
|
# signals#47: inputs and outputs derived from them reach the shell via
|
||||||
|
# env, never via ${{ }} expansion inside run: (a `"` or `$(...)` in an
|
||||||
|
# input would otherwise run as code).
|
||||||
|
env:
|
||||||
|
IN_RQ_ID: ${{ inputs.rq_id }}
|
||||||
|
IN_FIXTURE: ${{ inputs.fixture }}
|
||||||
run: |
|
run: |
|
||||||
RQ_ID="${{ inputs.rq_id }}"
|
RQ_ID="$IN_RQ_ID"
|
||||||
[ -z "$RQ_ID" ] && RQ_ID="${{ inputs.fixture }}"
|
[ -z "$RQ_ID" ] && RQ_ID="$IN_FIXTURE"
|
||||||
echo "rq_id=$RQ_ID" >> "$GITHUB_OUTPUT"
|
echo "rq_id=$RQ_ID" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Clean stale run dir
|
- name: Clean stale run dir
|
||||||
run: rm -rf "runs/${{ steps.vars.outputs.rq_id }}"
|
env:
|
||||||
|
RQ_ID: ${{ steps.vars.outputs.rq_id }}
|
||||||
|
run: rm -rf "runs/$RQ_ID"
|
||||||
|
|
||||||
- name: Set up Python venv
|
- name: Set up Python venv
|
||||||
run: |
|
run: |
|
||||||
@@ -48,20 +56,26 @@ jobs:
|
|||||||
.venv/bin/pip install -q -r requirements.txt
|
.venv/bin/pip install -q -r requirements.txt
|
||||||
|
|
||||||
- name: Scaffold run dir
|
- name: Scaffold run dir
|
||||||
|
env:
|
||||||
|
IN_FIXTURE: ${{ inputs.fixture }}
|
||||||
|
RQ_ID: ${{ steps.vars.outputs.rq_id }}
|
||||||
run: |
|
run: |
|
||||||
.venv/bin/python scripts/autoresearch_start.py \
|
.venv/bin/python scripts/autoresearch_start.py \
|
||||||
"fixtures/${{ inputs.fixture }}.json" \
|
"fixtures/$IN_FIXTURE.json" \
|
||||||
"${{ steps.vars.outputs.rq_id }}"
|
"$RQ_ID"
|
||||||
|
|
||||||
- name: Run autoresearch loop
|
- name: Run autoresearch loop
|
||||||
env:
|
env:
|
||||||
LITELLM_KEY: ${{ secrets.LITELLM_KEY }}
|
LITELLM_KEY: ${{ secrets.LITELLM_KEY }}
|
||||||
LITELLM_BASE: ${{ secrets.LITELLM_BASE }}
|
LITELLM_BASE: ${{ secrets.LITELLM_BASE }}
|
||||||
NTFY_URL: ${{ secrets.NTFY_URL }}
|
NTFY_URL: ${{ secrets.NTFY_URL }}
|
||||||
|
RQ_ID: ${{ steps.vars.outputs.rq_id }}
|
||||||
|
IN_ITERS: ${{ inputs.iters }}
|
||||||
|
IN_MODEL: ${{ inputs.model }}
|
||||||
run: |
|
run: |
|
||||||
ARGS="--run-dir runs/${{ steps.vars.outputs.rq_id }} --iters ${{ inputs.iters }}"
|
ARGS=(--run-dir "runs/$RQ_ID" --iters "$IN_ITERS")
|
||||||
[ -n "${{ inputs.model }}" ] && ARGS="$ARGS --model ${{ inputs.model }}"
|
[ -n "$IN_MODEL" ] && ARGS+=(--model "$IN_MODEL")
|
||||||
.venv/bin/python loop.py $ARGS
|
.venv/bin/python loop.py "${ARGS[@]}"
|
||||||
|
|
||||||
- name: Upload run artifacts
|
- name: Upload run artifacts
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||
Reference in New Issue
Block a user