From d3f883e71b9e72738c06483796f815dcfc78de20 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 2 May 2026 17:04:40 +0100 Subject: [PATCH] ci: initialize empty clawgrit report repo --- .github/workflows/openclaw-performance.yml | 27 +++++++++++++++------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/openclaw-performance.yml b/.github/workflows/openclaw-performance.yml index e0268d1b560..8c92a73af23 100644 --- a/.github/workflows/openclaw-performance.yml +++ b/.github/workflows/openclaw-performance.yml @@ -309,14 +309,25 @@ jobs: if-no-files-found: ignore retention-days: ${{ matrix.deep_profile == 'true' && 14 || 30 }} - - name: Checkout clawgrit reports + - name: Prepare clawgrit reports checkout if: ${{ steps.kova.outputs.report_json != '' && steps.clawgrit.outputs.present == 'true' }} - uses: actions/checkout@v6 - with: - repository: openclaw/clawgrit-reports - path: .artifacts/clawgrit-reports - token: ${{ secrets.CLAWGRIT_REPORTS_TOKEN }} - persist-credentials: true + env: + CLAWGRIT_REPORTS_TOKEN: ${{ secrets.CLAWGRIT_REPORTS_TOKEN }} + shell: bash + run: | + set -euo pipefail + reports_root=".artifacts/clawgrit-reports" + mkdir -p "$reports_root" + git -C "$reports_root" init -b main + git -C "$reports_root" remote add origin https://github.com/openclaw/clawgrit-reports.git + auth_header="$(printf 'x-access-token:%s' "$CLAWGRIT_REPORTS_TOKEN" | base64 -w0)" + git -C "$reports_root" config http.https://github.com/.extraheader "AUTHORIZATION: basic ${auth_header}" + if git -C "$reports_root" ls-remote --exit-code --heads origin main >/dev/null 2>&1; then + git -C "$reports_root" fetch --depth=1 origin main + git -C "$reports_root" checkout -B main FETCH_HEAD + else + git -C "$reports_root" checkout -B main + fi - name: Publish to clawgrit reports if: ${{ steps.kova.outputs.report_json != '' && steps.clawgrit.outputs.present == 'true' }} @@ -358,4 +369,4 @@ jobs: exit 0 fi git -C "$reports_root" commit -m "perf: add OpenClaw ${LANE_ID} report ${GITHUB_SHA::12}" - git -C "$reports_root" push + git -C "$reports_root" push origin HEAD:main