From 6e3b72b68ad10594479353ffdaf519f069585b15 Mon Sep 17 00:00:00 2001 From: oskar <53711292+oskarkocol@users.noreply.github.com> Date: Mon, 13 Jul 2026 19:14:31 +0700 Subject: [PATCH] run update after checkout --- .../workflows/auto_update_price_and_context_window.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/auto_update_price_and_context_window.yml b/.github/workflows/auto_update_price_and_context_window.yml index d16ac269199..76e47a518fd 100644 --- a/.github/workflows/auto_update_price_and_context_window.yml +++ b/.github/workflows/auto_update_price_and_context_window.yml @@ -22,9 +22,6 @@ jobs: uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 with: version: "0.10.9" - - name: Update JSON Data - run: | - uv run --frozen --with 'aiohttp==3.13.3' python ".github/workflows/auto_update_price_and_context_window_file.py" - name: Create Pull Request env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -34,12 +31,13 @@ jobs: git config user.email "github-actions[bot]@users.noreply.github.com" BRANCH_NAME="auto-update-price-and-context-window-$(date +'%Y-%m-%d')" BASE_BRANCH="${{ github.event.repository.default_branch }}" - git fetch origin "${BRANCH_NAME}" || true + git fetch origin "${BASE_BRANCH}" "${BRANCH_NAME}" || true if git show-ref --verify --quiet "refs/remotes/origin/${BRANCH_NAME}"; then git checkout -B "${BRANCH_NAME}" "origin/${BRANCH_NAME}" else - git checkout -b "${BRANCH_NAME}" + git checkout -b "${BRANCH_NAME}" "origin/${BASE_BRANCH}" fi + uv run --frozen --with 'aiohttp==3.13.3' python ".github/workflows/auto_update_price_and_context_window_file.py" git add model_prices_and_context_window.json git commit -m "Update model_prices_and_context_window.json file: $(date +'%Y-%m-%d')" git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "${BRANCH_NAME}"