From b2bd9e77465f2f4d8f77eaad41d4772a80e2362b Mon Sep 17 00:00:00 2001 From: Ammar Date: Wed, 29 Oct 2025 23:05:14 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20fix:=20use=20shell=20script=20fo?= =?UTF-8?q?r=20artifact=20name=20instead=20of=20replace()=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitHub Actions does not support the replace() function in workflow expressions. Use a shell script step with 'tr' command instead to replace colons with hyphens in artifact names. This fixes the syntax error that caused the nightly workflow to fail. --- .github/workflows/terminal-bench.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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