mirror of
https://github.com/wp-statistics/GeoLite2-City.git
synced 2025-12-29 14:12:24 +00:00
Add force_publish option to workflow
🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
14
.github/workflows/update-database.yml
vendored
14
.github/workflows/update-database.yml
vendored
@@ -4,7 +4,13 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
# Run every Tuesday and Friday at 06:00 UTC (MaxMind update days)
|
# Run every Tuesday and Friday at 06:00 UTC (MaxMind update days)
|
||||||
- cron: '0 6 * * 2,5'
|
- 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:
|
jobs:
|
||||||
update:
|
update:
|
||||||
@@ -65,7 +71,11 @@ jobs:
|
|||||||
- name: Check for changes
|
- name: Check for changes
|
||||||
id: check_changes
|
id: check_changes
|
||||||
run: |
|
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 "No changes detected"
|
||||||
echo "changed=false" >> $GITHUB_OUTPUT
|
echo "changed=false" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user