From 0bf69ce6b575dc10e921eccd677a244fd542c4fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Wed, 3 Jun 2026 06:12:43 +0300 Subject: [PATCH] chore(lead-region-ops): add force input for phone-ranges:import Re-import skips on identical checksum without --force. Adds a 'force' boolean dispatch input wired into the import op so the registry can be re-mapped after the region-normalization fix (PR #44). --- .github/workflows/lead-region-ops.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lead-region-ops.yml b/.github/workflows/lead-region-ops.yml index 05360179..a2901f27 100644 --- a/.github/workflows/lead-region-ops.yml +++ b/.github/workflows/lead-region-ops.yml @@ -53,6 +53,11 @@ on: required: false default: true type: boolean + force: + description: 'import: принудительно (--force, игнорировать «реестр идентичен»)' + required: false + default: false + type: boolean phone: description: 'smoke: телефон' required: false @@ -77,6 +82,7 @@ jobs: URL: ${{ github.event.inputs.url }} DIR: ${{ github.event.inputs.dir }} DRY: ${{ github.event.inputs.dry_run }} + FORCE: ${{ github.event.inputs.force }} PHONE: ${{ github.event.inputs.phone }} steps: @@ -344,12 +350,14 @@ jobs: run: | DRY_FLAG="" if [ "${DRY}" = "true" ]; then DRY_FLAG="--dry-run"; fi + FORCE_FLAG="" + if [ "${FORCE}" = "true" ]; then FORCE_FLAG="--force"; fi ssh -i ~/.ssh/liderra_deploy "${LIDERRA_USER}@${LIDERRA_HOST}" \ - "APP_DIR='$APP_DIR' DIR='$DIR' DRY_FLAG='$DRY_FLAG' bash -s" <<'REMOTE' | tee /tmp/op.log + "APP_DIR='$APP_DIR' DIR='$DIR' DRY_FLAG='$DRY_FLAG' FORCE_FLAG='$FORCE_FLAG' bash -s" <<'REMOTE' | tee /tmp/op.log set -e cd "$APP_DIR" - echo "=== phone-ranges:import --dir=${DIR} ${DRY_FLAG} ===" - sudo -u www-data php artisan phone-ranges:import --dir="$DIR" $DRY_FLAG 2>&1 + echo "=== phone-ranges:import --dir=${DIR} ${DRY_FLAG} ${FORCE_FLAG} ===" + sudo -u www-data php artisan phone-ranges:import --dir="$DIR" $DRY_FLAG $FORCE_FLAG 2>&1 echo "=== Счётчики ===" sudo -u postgres psql -d liderra -c "SELECT count(*) AS phone_ranges FROM phone_ranges" 2>&1 || true # staging-счётчик: 2 отдельных запроса, чтобы Postgres не парсил