diff --git a/.github/workflows/terminal-bench.yml b/.github/workflows/terminal-bench.yml index 83905f86c..1f99b42ae 100644 --- a/.github/workflows/terminal-bench.yml +++ b/.github/workflows/terminal-bench.yml @@ -126,12 +126,24 @@ jobs: ls -la runs/ fi + - name: Set artifact name + if: always() + id: artifact-name + run: | + if [ -n "${{ inputs.model_name }}" ]; then + # Replace colons with hyphens for filesystem compatibility + ARTIFACT_NAME="terminal-bench-results-$(echo "${{ inputs.model_name }}-${{ github.run_id }}" | tr ':' '-')" + else + ARTIFACT_NAME="terminal-bench-results-${{ github.run_id }}" + fi + echo "name=$ARTIFACT_NAME" >> $GITHUB_OUTPUT + echo "Artifact name: $ARTIFACT_NAME" + - name: Upload benchmark results if: always() uses: actions/upload-artifact@v4 with: - # Replace colons with hyphens to avoid GitHub artifact name restrictions - name: terminal-bench-results-${{ inputs.model_name && replace(format('{0}-{1}', inputs.model_name, github.run_id), ':', '-') || format('{0}', github.run_id) }} + name: ${{ steps.artifact-name.outputs.name }} path: | runs/ if-no-files-found: warn