From 82ff47b78fc5a9f1cd92e7b6e2673cebddba9145 Mon Sep 17 00:00:00 2001 From: mostafa Date: Sun, 21 Dec 2025 21:49:07 +0330 Subject: [PATCH] Add force_publish option to workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- .github/workflows/update-database.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-database.yml b/.github/workflows/update-database.yml index 119bcc0..e724999 100644 --- a/.github/workflows/update-database.yml +++ b/.github/workflows/update-database.yml @@ -4,7 +4,13 @@ on: schedule: # Run every Tuesday and Friday at 06:00 UTC (MaxMind update days) - cron: '0 6 * * 2,5' - workflow_dispatch: # Manual trigger + workflow_dispatch: + inputs: + force_publish: + description: 'Force publish to npm even if no changes' + required: false + default: 'false' + type: boolean jobs: update: @@ -65,7 +71,11 @@ jobs: - name: Check for changes id: check_changes run: | - if git diff --quiet GeoLite2-City.mmdb.gz 2>/dev/null; then + FORCE="${{ inputs.force_publish }}" + if [ "$FORCE" == "true" ]; then + echo "Force publish requested" + echo "changed=true" >> $GITHUB_OUTPUT + elif git diff --quiet GeoLite2-City.mmdb.gz 2>/dev/null; then echo "No changes detected" echo "changed=false" >> $GITHUB_OUTPUT else