diff --git a/.github/workflows/cost-map-guard.yml b/.github/workflows/cost-map-guard.yml index b0ac841fd15..cfa0fc0fa87 100644 --- a/.github/workflows/cost-map-guard.yml +++ b/.github/workflows/cost-map-guard.yml @@ -49,7 +49,12 @@ jobs: HEAD_SHA: ${{ github.event.pull_request.head.sha }} HEAD_REF: ${{ github.event.pull_request.head.ref }} run: | - uv run --no-project python scripts/ci_cd/cost_map_guard.py --base "$MERGE_BASE" --head "$HEAD_SHA" --head-ref "$HEAD_REF" + guard=scripts/ci_cd/cost_map_guard.py + # TODO: Drop the legacy path after this lands on main. + if [ ! -f "$guard" ]; then + guard=ci_cd/cost_map_guard.py + fi + uv run --no-project python "$guard" --base "$MERGE_BASE" --head "$HEAD_SHA" --head-ref "$HEAD_REF" - name: Check whether the pull request changes the cost map id: changed env: diff --git a/.github/workflows/spend-logs-guard.yml b/.github/workflows/spend-logs-guard.yml index 37703437c03..26523450013 100644 --- a/.github/workflows/spend-logs-guard.yml +++ b/.github/workflows/spend-logs-guard.yml @@ -42,4 +42,9 @@ jobs: MERGE_BASE: ${{ steps.revisions.outputs.merge_base }} HEAD_SHA: ${{ github.event.pull_request.head.sha }} run: | - uv run --no-project --with pydantic==2.14.1 python scripts/ci_cd/spend_logs_guard.py --base "$MERGE_BASE" --head "$HEAD_SHA" --approver kerry-berri --reviews "$RUNNER_TEMP/reviews.json" + guard=scripts/ci_cd/spend_logs_guard.py + # TODO: Drop the legacy path after this lands on main. + if [ ! -f "$guard" ]; then + guard=ci_cd/spend_logs_guard.py + fi + uv run --no-project --with pydantic==2.14.1 python "$guard" --base "$MERGE_BASE" --head "$HEAD_SHA" --approver kerry-berri --reviews "$RUNNER_TEMP/reviews.json"